mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_str_len_to_inum: should not raise "string contains null byte" error on "0x"; fix #3043
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user