unpacked: Don't list a position or length for directory entries.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 21 Jul 2017 13:55:03 -0400
changeset 1495 2ac61188ad60
parent 1494 4e2c7ce9bf11
child 1496 6e1c8ff88482
unpacked: Don't list a position or length for directory entries.
src/archiver_unpacked.c
--- a/src/archiver_unpacked.c	Fri Jul 21 13:54:42 2017 -0400
+++ b/src/archiver_unpacked.c	Fri Jul 21 13:55:03 2017 -0400
@@ -264,8 +264,8 @@
     entry = (UNPKentry *) __PHYSFS_DirTreeAdd(&info->tree, name, isdir);
     BAIL_IF_ERRPASS(!entry, NULL);
 
-    entry->startPos = pos;
-    entry->size = len;
+    entry->startPos = isdir ? 0 : pos;
+    entry->size = isdir ? 0 : len;
 
     return entry;
 } /* UNPK_addEntry */