summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-08-10 00:15:51 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-08-10 00:15:51 +0200
commitd0578fdfee2422c97ce4eb01a73c7251977f4260 (patch)
tree3612d2229ab65912a9dbbf4b23c382362c7dbe9b
parent09b60d4c62a32e9458f5e833f4ea3a8688594363 (diff)
Seems win32's zlib's acting up. Let's work that around.
-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);
}