Skip to content

Commit

Permalink
Fix all zero string case
Browse files Browse the repository at this point in the history
  • Loading branch information
syohex committed Jan 14, 2016
1 parent 2a661ac commit 787685a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 787685a

Please sign in to comment.