summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-12-01 11:14:22 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-12-01 11:14:22 +0900
commitd3a56a694935202efa16f752e092f965abfca5aa (patch)
tree70d429bf4bbf10c6d697a1ea3dc86d3e54d38cf6
parentdbb8cf637e8311ffa3c35829d4c007b1434fe0c6 (diff)
downloadmruby-d3a56a694935202efa16f752e092f965abfca5aa.tar.gz
mruby-d3a56a694935202efa16f752e092f965abfca5aa.zip
mrb_cstr_to_inum(): should ignore trailing white spaces even when badcheck set
-rw-r--r--src/string.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 6c1988e92..6ea139c90 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2150,7 +2150,6 @@ mrb_cstr_to_inum(mrb_state *mrb, const char *str, int base, int badcheck)
uscore = 0;
c = conv_digit(*p);
if (c < 0 || c >= base) {
- if (badcheck) goto bad;
break;
}
n *= base;