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 | 2c71354009ffc9252b1e002cd762a9158427733c (patch) | |
tree | 80cc6a15ac16d51ca729ec9160d0fcc7b4c07f87 /ext | |
parent | 247f12b913f5334e06c100446d4add0378e7fb55 (diff) | |
download | ruby-2c71354009ffc9252b1e002cd762a9158427733c.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)); } } |