mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed a bug in mrb_convert_to_integer(); fix #3581
Did not update the result from `mrb_check_string_type()` before string-to-integer conversion.
This commit is contained in:
@@ -553,6 +553,7 @@ mrb_convert_to_integer(mrb_state *mrb, mrb_value val, int base)
|
||||
if (base != 0) {
|
||||
tmp = mrb_check_string_type(mrb, val);
|
||||
if (!mrb_nil_p(tmp)) {
|
||||
val = tmp;
|
||||
goto string_conv;
|
||||
}
|
||||
arg_error:
|
||||
|
||||
Reference in New Issue
Block a user