Skip to content

Commit

Permalink
Fix reading non-sequential lumps in AAS files in pk3 files
Browse files Browse the repository at this point in the history
FS_Seek() doesn't always return 0 on success. If the file in a pk3 file
it returns the seek offset. This change doesn't fix any known AAS files.
  • Loading branch information
zturtleman committed Sep 25, 2024
1 parent 00d60d0 commit 4ee389b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/botlib/be_aas_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ char *AAS_LoadAASLump(fileHandle_t fp, int offset, int length, int *lastoffset,
if (offset != *lastoffset)
{
botimport.Print(PRT_WARNING, "AAS file not sequentially read\n");
if (botimport.FS_Seek(fp, offset, FS_SEEK_SET))
if (botimport.FS_Seek(fp, offset, FS_SEEK_SET) < 0)
{
AAS_Error("can't seek to aas lump\n");
AAS_DumpAASData();
Expand Down

0 comments on commit 4ee389b

Please sign in to comment.