Skip to content

Commit

Permalink
Backported zip/qpak dir fix from dev branch to stable-2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 18, 2011
1 parent b9c25d3 commit 6b96ff2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion archivers/qpak.c
Expand Up @@ -478,8 +478,11 @@ static QPAKentry *qpak_find_entry(QPAKinfo *info, const char *path, int *isDir)

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 archivers/zip.c
Expand Up @@ -544,8 +544,11 @@ static ZIPentry *zip_find_entry(ZIPinfo *info, const char *path, int *isDir)

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 6b96ff2

Please sign in to comment.