Ver código fonte

lec3d: fix bug in LFD content generator

The LFD archiver included the 16-byte file metadata into the file.
Fix this.
Manuel Lauss 1 ano atrás
pai
commit
b1a2f1f18b
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/physfs_archiver_lec3d.c

+ 2 - 1
src/physfs_archiver_lec3d.c

@@ -186,9 +186,10 @@ static int lfdLoadEntries(PHYSFS_Io *io, const PHYSFS_uint32 skip, void *arc)
 		finalname[i] = '.';
 		strcpy(finalname + i + 1, ext);
 
+		pos += 16;	/* step over file meta info */
 		BAIL_IF_ERRPASS(!UNPK_addEntry(arc, finalname, 0, -1, -1, pos, dlen), 0);
 
-		pos += 16 + dlen;	/* name+size entry + actual size */
+		pos += dlen;	/* step over file contents */
 	}
 
 	return 1;