summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-06 07:38:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-04-06 07:38:52 +0000
commita3a88c6bcdd96423bcf2ea9821ccc27f3dd02f96 (patch)
tree2a88e40be30bf6e73f32170460e271cd0aac5970 /numeric.c
parent1b71f8a53ba28fb0fa10620ce9bae2771ce5f1dd (diff)
* file.c (sys_fail2, rb_file_s_readlink, BUFCHECK, rmext),
(rb_file_s_basename): get rid of overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 4816140d97..dad085e890 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1974,7 +1974,7 @@ int_chr(int argc, VALUE *argv, VALUE num)
#endif
if (i < 0 || (n = rb_enc_codelen((int)i, enc)) <= 0) goto out_of_range;
str = rb_enc_str_new(0, n, enc);
- rb_enc_mbcput(i, RSTRING_PTR(str), enc);
+ rb_enc_mbcput((int)i, RSTRING_PTR(str), enc);
return str;
}