mrb_str_len_to_inum: should not raise "string contains null byte" error on "0x"; fix #3043

parent ad333cd1
......@@ -2137,7 +2137,7 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, size_t len, int base, int b
}
c = *p;
if (badcheck && c == '\0') {
goto nullbyte;
goto bad;
}
c = conv_digit(c);
if (c < 0 || c >= base) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment