summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-12-12 12:03:03 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-12-12 16:33:48 +0900
commit26a25e1666abe2086187b36ccb9c2bc6e2eec613 (patch)
treec3dc4a9d28305cd6828ee89b0e350ee75229991f /src
parentad333cd191f736b312cec090e31d91a382a7cb20 (diff)
downloadmruby-26a25e1666abe2086187b36ccb9c2bc6e2eec613.tar.gz
mruby-26a25e1666abe2086187b36ccb9c2bc6e2eec613.zip
mrb_str_len_to_inum: should not raise "string contains null byte" error on "0x"; fix #3043
Diffstat (limited to 'src')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
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) {