summaryrefslogtreecommitdiffstats
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
commitb966fa92b38dee56ada6f989f8d41a44a35dcdbd (patch)
tree2a88e40be30bf6e73f32170460e271cd0aac5970 /numeric.c
parent1d6d10f3cfc6f89341d107bd469fc9257a740caf (diff)
downloadruby-b966fa92b38dee56ada6f989f8d41a44a35dcdbd.tar.gz
ruby-b966fa92b38dee56ada6f989f8d41a44a35dcdbd.tar.xz
ruby-b966fa92b38dee56ada6f989f8d41a44a35dcdbd.zip
* file.c (sys_fail2, rb_file_s_readlink, BUFCHECK, rmext),
(rb_file_s_basename): get rid of overflow. git-svn-id: http://svn.ruby-lang.org/repos/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 4816140d9..dad085e89 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;
}