From bd035bcbb6b6ed79501b073111ca2c5ea8b29dee Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Mon, 30 Jul 2012 09:40:41 +0900 Subject: do not use INT32_MAX; close #407 --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/string.c b/src/string.c index 0a5dee88e..aab8c9616 100644 --- a/src/string.c +++ b/src/string.c @@ -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"); } -- cgit v1.2.3