Fixed bug in directory search for zip and qpak archivers (thanks, Michal!)
This commit is contained in:
parent
54f72a0b42
commit
660c7f9823
|
@ -434,8 +434,11 @@ static QPAKentry *qpak_find_entry(const QPAKinfo *info, const char *path,
|
||||||
|
|
||||||
if (thispath[pathlen] == '\0') /* found entry? */
|
if (thispath[pathlen] == '\0') /* found entry? */
|
||||||
return &a[middle];
|
return &a[middle];
|
||||||
|
/* adjust search params, try again. */
|
||||||
|
else if (thispath[pathlen] > '/')
|
||||||
|
hi = middle - 1;
|
||||||
else
|
else
|
||||||
hi = middle - 1; /* adjust search params, try again. */
|
lo = middle + 1;
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* while */
|
} /* while */
|
||||||
|
|
||||||
|
|
|
@ -585,8 +585,11 @@ static ZIPentry *zip_find_entry(const ZIPinfo *info, const char *path,
|
||||||
|
|
||||||
if (thispath[pathlen] == '\0') /* found entry? */
|
if (thispath[pathlen] == '\0') /* found entry? */
|
||||||
return &a[middle];
|
return &a[middle];
|
||||||
|
/* adjust search params, try again. */
|
||||||
|
else if (thispath[pathlen] > '/')
|
||||||
|
hi = middle - 1;
|
||||||
else
|
else
|
||||||
hi = middle - 1; /* adjust search params, try again. */
|
lo = middle + 1;
|
||||||
} /* if */
|
} /* if */
|
||||||
} /* while */
|
} /* while */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue