Fixed logic error in QPAK archiver.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 10 Feb 2011 16:54:09 -0500
changeset 1138 e57e3936d071
parent 1136 888695d89f70
child 1139 861def17a888
Fixed logic error in QPAK archiver. Should haved tested for a failed seek, but was testing for success instead.
src/archiver_qpak.c
--- a/src/archiver_qpak.c	Fri Jan 21 03:07:14 2011 -0500
+++ b/src/archiver_qpak.c	Thu Feb 10 16:54:09 2011 -0500
@@ -261,7 +261,7 @@
     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);