diff --git a/src/string.c b/src/string.c index 9ef5b5fb4..38aa6561e 100644 --- a/src/string.c +++ b/src/string.c @@ -2052,23 +2052,23 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, size_t len, int base, int b ISUPPER(c) ? ((c) - 'A' + 10) : \ -1) - if (!str) { + if (!p) { if (badcheck) goto bad; return mrb_fixnum_value(0); } - while (str