diff options
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hgzip.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx index 20f40d26855b..6b7e0b973e8e 100644 --- a/hwpfilter/source/hgzip.cxx +++ b/hwpfilter/source/hgzip.cxx @@ -284,15 +284,15 @@ int gz_flush(gz_stream * file, int flush) */ local uLong getLong(gz_stream * s) { - uLong x = (uLong) get_byte(s); - int c; + uLong x = (unsigned char) get_byte(s); - x += ((uLong) get_byte(s)) << 8; - x += ((uLong) get_byte(s)) << 16; - c = get_byte(s); - if (c == EOF) + x += ((unsigned char) get_byte(s)) << 8; + x += ((unsigned char) get_byte(s)) << 16; + x += ((unsigned char) get_byte(s)) << 24; + if (s->z_eof) + { s->z_err = Z_DATA_ERROR; - x += ((uLong) c) << 24; + } return x; } |