mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
do not use INT32_MAX; close #407
This commit is contained in:
+1
-1
@@ -431,7 +431,7 @@ mrb_str_times(mrb_state *mrb, mrb_value self)
|
||||
if (times < 0) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "negative argument");
|
||||
}
|
||||
if (times && INT32_MAX/times < RSTRING_LEN(self)) {
|
||||
if (times && INT_MAX/times < RSTRING_LEN(self)) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "argument too big");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user