Sfoglia il codice sorgente

lec3d: fix bug in LFD content generator

The LFD archiver included the 16-byte file metadata into the file.
Fix this.
Manuel Lauss 1 anno fa
parent
commit
b1a2f1f18b
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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] = '.';
 		finalname[i] = '.';
 		strcpy(finalname + i + 1, ext);
 		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);
 		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;
 	return 1;