Skip to content
Permalink
Browse files
Fixed bug in directory search for zip and qpak archivers (thanks, Mic…
…hal!)
  • Loading branch information
icculus committed Feb 18, 2011
1 parent 54f72a0 commit 660c7f9823216bdab1e063e629c22e82543806f4
Showing with 8 additions and 2 deletions.
  1. +4 −1 src/archiver_qpak.c
  2. +4 −1 src/archiver_zip.c
@@ -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 */

@@ -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 */

0 comments on commit 660c7f9

Please sign in to comment.