Commit bd035bcb authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

do not use INT32_MAX; close #407

parent 0584874e
......@@ -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");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment