summaryrefslogtreecommitdiff
path: root/ext/zlib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 13:50:00 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-14 13:50:00 (GMT)
commit5d6c1f42d56e390732397bc115f7d7240eec5e10 (patch)
tree80cc6a15ac16d51ca729ec9160d0fcc7b4c07f87 /ext/zlib
parent57464618abee8c5d35d9a24767cdb62d1459b341 (diff)
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/zlib')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index ce1139d..336cb2d 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));
}
}