Fix reading non-sequential lumps in AAS files in pk3 files

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.
This commit is contained in:
Zack Middleton 2024-09-24 20:37:01 -05:00
parent 00d60d05c4
commit 4ee389b6b2

View file

@ -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();