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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-12-12 12:03:03 +09:00
parent ad333cd191
commit 26a25e1666
+1 -1
View File
@@ -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) {