summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-07-30 09:40:41 +0900
committerYukihiro Matsumoto <[email protected]>2012-07-30 09:40:41 +0900
commitbd035bcbb6b6ed79501b073111ca2c5ea8b29dee (patch)
tree735d8a70a1f95f5671a46ba181906f6dc5279068 /src
parent0584874e59ed3601fa2809a1ab86ec0a5f076d5c (diff)
downloadmruby-bd035bcbb6b6ed79501b073111ca2c5ea8b29dee.tar.gz
mruby-bd035bcbb6b6ed79501b073111ca2c5ea8b29dee.zip
do not use INT32_MAX; close #407
Diffstat (limited to 'src')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
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");
}