ruby-changes:47222
From: nobu <ko1@a...>
Date: Fri, 14 Jul 2017 22:50:06 +0900 (JST)
Subject: [ruby-changes:47222] nobu:r59337 (trunk): zlib.c: fix unnormalized Fixnum
nobu 2017-07-14 22:50:00 +0900 (Fri, 14 Jul 2017) New Revision: 59337 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59337 Log: 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] Modified files: trunk/ext/zlib/zlib.c Index: ext/zlib/zlib.c =================================================================== --- ext/zlib/zlib.c (revision 59336) +++ ext/zlib/zlib.c (revision 59337) @@ -3399,7 +3399,7 @@ rb_gzfile_total_out(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L3399 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)); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/