From 706f50be0a0736cbcabc35b6bcefcfd397678711 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 10 Feb 2011 16:54:09 -0500 Subject: [PATCH] Fixed logic error in QPAK archiver. Should haved tested for a failed seek, but was testing for success instead. --- src/archiver_qpak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/archiver_qpak.c b/src/archiver_qpak.c index b74cb4e0..40b0fa8d 100644 --- a/src/archiver_qpak.c +++ b/src/archiver_qpak.c @@ -261,7 +261,7 @@ static void *QPAK_openArchive(PHYSFS_Io *io, const char *name, int forWriting) BAIL_IF_MACRO((count % 64) != 0, ERR_CORRUPTED, NULL); count /= 64; - BAIL_IF_MACRO(io->seek(io, pos), NULL, NULL); + BAIL_IF_MACRO(!io->seek(io, pos), NULL, NULL); info = (QPAKinfo *) allocator.Malloc(sizeof (QPAKinfo)); BAIL_IF_MACRO(info == NULL, ERR_OUT_OF_MEMORY, NULL);