Skip to content

Commit

Permalink
Logic bug in MVL/HOG/GRP archivers: these archives never contain subd…
Browse files Browse the repository at this point in the history
…irs...but they

 only enumerated their files when looking in a directory other than the root,
 instead of enumerating only for the root. Thanks to Chris Taylor for the
 catch.
  • Loading branch information
icculus committed Mar 28, 2007
1 parent ded10c9 commit 1e65502
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Expand Up @@ -2,6 +2,9 @@
* CHANGELOG.
*/

03282007 - Logic bug in MVL/HOG/GRP archivers: only enumerated files when
looking in a directory other than the root, instead of enumerating
only for the root (thanks, Chris!).
03262007 - Tons of Unicode work in windows.c ... should now use UCS-2 on
NT/XP/Vista/etc versions of the OS, and fallback to "ANSI" versions
for 95/98/ME, tapdancing around the system codepage if it has to.
Expand Down
2 changes: 1 addition & 1 deletion archivers/grp.c
Expand Up @@ -295,7 +295,7 @@ static void GRP_enumerateFiles(dvoid *opaque, const char *dname,
const char *origdir, void *callbackdata)
{
/* no directories in GRP files. */
if (*dname != '\0')
if (*dname == '\0')
{
GRPinfo *info = (GRPinfo *) opaque;
GRPentry *entry = info->entries;
Expand Down
2 changes: 1 addition & 1 deletion archivers/hog.c
Expand Up @@ -334,7 +334,7 @@ static void HOG_enumerateFiles(dvoid *opaque, const char *dname,
const char *origdir, void *callbackdata)
{
/* no directories in HOG files. */
if (*dname != '\0')
if (*dname == '\0')
{
HOGinfo *info = (HOGinfo *) opaque;
HOGentry *entry = info->entries;
Expand Down
2 changes: 1 addition & 1 deletion archivers/mvl.c
Expand Up @@ -291,7 +291,7 @@ static void MVL_enumerateFiles(dvoid *opaque, const char *dname,
const char *origdir, void *callbackdata)
{
/* no directories in MVL files. */
if (*dname != '\0')
if (*dname == '\0')
{
MVLinfo *info = ((MVLinfo *) opaque);
MVLentry *entry = info->entries;
Expand Down

0 comments on commit 1e65502

Please sign in to comment.