From b1a2f1f18bce3dc0dea29314b5d7fb887d4c10ae Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Fri, 6 Sep 2024 22:31:37 +0200 Subject: [PATCH] lec3d: fix bug in LFD content generator The LFD archiver included the 16-byte file metadata into the file. Fix this. --- src/physfs_archiver_lec3d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/physfs_archiver_lec3d.c b/src/physfs_archiver_lec3d.c index fa1a3e9..3d0c501 100644 --- a/src/physfs_archiver_lec3d.c +++ b/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;