Skip to content

Commit

Permalink
lec3d: fix bug in LFD content generator
Browse files Browse the repository at this point in the history
The LFD archiver included the 16-byte file metadata into the file.
Fix this.
  • Loading branch information
mlauss2 authored and icculus committed Sep 6, 2024
1 parent 1990660 commit b1a2f1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/physfs_archiver_lec3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b1a2f1f

Please sign in to comment.