diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-14 13:50:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-07-14 13:50:00 +0000 |
commit | 5d6c1f42d56e390732397bc115f7d7240eec5e10 (patch) | |
tree | 80cc6a15ac16d51ca729ec9160d0fcc7b4c07f87 /ext | |
parent | 57464618abee8c5d35d9a24767cdb62d1459b341 (diff) | |
download | ruby-5d6c1f42d56e390732397bc115f7d7240eec5e10.tar.gz |
zlib.c: fix unnormalized Fixnum
* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
result in an unsigned long to normalized to Fixnum on LLP64
platforms. [ruby-core:81488]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zlib/zlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ce1139dc5d..336cb2d095 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -3399,7 +3399,7 @@ rb_gzfile_total_out(VALUE obj) if (total_out >= (uLong)buf_filled) { return rb_uint2inum(total_out - buf_filled); } else { - return LONG2FIX(-(buf_filled - total_out)); + return LONG2FIX(-(buf_filled - (long)total_out)); } } |