Skip to content

Commit

Permalink
Fixed a bug in mrb_convert_to_integer(); fix #3581
Browse files Browse the repository at this point in the history
Did not update the result from `mrb_check_string_type()` before
string-to-integer conversion.
  • Loading branch information
matz committed Apr 10, 2017
1 parent 03c8493 commit db47ae5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/object.c
Expand Up @@ -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:
Expand Down

0 comments on commit db47ae5

Please sign in to comment.