Skip to content

Commit

Permalink
Fixed bug in directory search for zip and qpak archivers (thanks, Mic…
Browse files Browse the repository at this point in the history
…hal!)
  • Loading branch information
icculus committed Feb 18, 2011
1 parent 54f72a0 commit 660c7f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/archiver_qpak.c
Expand Up @@ -434,8 +434,11 @@ static QPAKentry *qpak_find_entry(const QPAKinfo *info, const char *path,

if (thispath[pathlen] == '\0') /* found entry? */
return &a[middle];
/* adjust search params, try again. */
else if (thispath[pathlen] > '/')
hi = middle - 1;
else
hi = middle - 1; /* adjust search params, try again. */
lo = middle + 1;
} /* if */
} /* while */

Expand Down
5 changes: 4 additions & 1 deletion src/archiver_zip.c
Expand Up @@ -585,8 +585,11 @@ static ZIPentry *zip_find_entry(const ZIPinfo *info, const char *path,

if (thispath[pathlen] == '\0') /* found entry? */
return &a[middle];
/* adjust search params, try again. */
else if (thispath[pathlen] > '/')
hi = middle - 1;
else
hi = middle - 1; /* adjust search params, try again. */
lo = middle + 1;
} /* if */
} /* while */

Expand Down

0 comments on commit 660c7f9

Please sign in to comment.