Fix all zero string case

This commit is contained in:
Syohei YOSHIDA
2016-01-14 11:07:07 +09:00
parent 2a661ac612
commit 787685a0b9
+2
View File
@@ -2153,6 +2153,8 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, size_t len, int base, int b
break;
}
}
if (*(p - 1) == '0')
p--;
}
if (p == pend) {
if (badcheck) goto bad;