Explorar o código

More enumerate fixes.

Ryan C. Gordon %!s(int64=24) %!d(string=hai) anos
pai
achega
1b29c3888c
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      archivers/zip.c

+ 2 - 3
archivers/zip.c

@@ -1289,9 +1289,8 @@ static LinkedStringList *ZIP_enumerateFiles(DirHandle *h,
             while ((++i < max) && (ptr != NULL))
             {
                 char *e_new = info->entries[i].name;
-                if ((strncmp(e, e_new, ln) == 0) && (e_new[ln] == '/'))
-                    continue;
-                ptr = NULL;
+                if ((strncmp(e, e_new, ln) != 0) || (e_new[ln] != '/'))
+                    break;
             } /* while */
         } /* else */
     } /* while */