summaryrefslogtreecommitdiff
path: root/mpq-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpq-file.c')
-rw-r--r--mpq-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpq-file.c b/mpq-file.c
index 149f824..5bb4ece 100644
--- a/mpq-file.c
+++ b/mpq-file.c
@@ -162,7 +162,7 @@ static int cache_sector(struct mpq_file_t * mpq_f, int sector) {
z.zalloc = NULL;
z.zfree = NULL;
if (inflateInit(&z) == 0) {
- r = inflate(&z, Z_FINISH) == 0 ? 1 : 0;
+ r = inflate(&z, Z_FINISH) >= 0 ? 1 : 0;
ol = z.total_out;
inflateEnd(&z);
}