diff options
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 b89738de89..73efe8e01b 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2387,7 +2387,7 @@ rb_gzreader_getc(obj) dst = gzfile_read(gz, 1); if (!NIL_P(dst)) { - dst = INT2FIX(RSTRING(dst)->ptr[0]); + dst = INT2FIX((unsigned int)(RSTRING(dst)->ptr[0]) & 0xff); } return dst; } |