From 26a25e1666abe2086187b36ccb9c2bc6e2eec613 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 12 Dec 2015 12:03:03 +0900 Subject: mrb_str_len_to_inum: should not raise "string contains null byte" error on "0x"; fix #3043 --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/string.c b/src/string.c index 3603d5ac7..79606f1af 100644 --- a/src/string.c +++ b/src/string.c @@ -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) { -- cgit v1.2.3