Skip to content

Commit

Permalink
Fix how MAPINFO lumps are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Aug 16, 2024
1 parent da0014e commit 852f05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3413,7 +3413,7 @@ static bool P_ParseMapInfo(const char *scriptname)
char *temp1;
char *temp2;

for (MAPINFO = 0; MAPINFO < numlumps; MAPINFO++)
for (MAPINFO = numlumps - 1; MAPINFO >= 0; MAPINFO--)
if (!strncasecmp(lumpinfo[MAPINFO]->name, scriptname, 8))
{
char *file = leafname(lumpinfo[MAPINFO]->wadfile->path);
Expand All @@ -3422,7 +3422,7 @@ static bool P_ParseMapInfo(const char *scriptname)
break;
}

if (MAPINFO == numlumps)
if (MAPINFO == -1)
return false;

mapinfolump = uppercase(scriptname);
Expand Down

0 comments on commit 852f05b

Please sign in to comment.