From d0578fdfee2422c97ce4eb01a73c7251977f4260 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 10 Aug 2009 00:15:51 +0200 Subject: Seems win32's zlib's acting up. Let's work that around. --- mpq-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3