Skip to content

Commit

Permalink
Fixed logic error in QPAK archiver.
Browse files Browse the repository at this point in the history
Should haved tested for a failed seek, but was testing for success instead.
  • Loading branch information
icculus committed Feb 10, 2011
1 parent 82b8546 commit 706f50b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/archiver_qpak.c
Expand Up @@ -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);
Expand Down

0 comments on commit 706f50b

Please sign in to comment.