Skip to content

Commit

Permalink
LL: Fix infinite loop in new Suprise Mode code
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac committed Jul 26, 2024
1 parent 8bcb2aa commit 5c7e5ab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions source/loonyland/guy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2101,17 +2101,13 @@ byte SurpriseMonster(byte origType,byte tag,int x,int y,Map *map,world_t *world)
continue;
// make sure it is an ok monster
i=0;
while(1)
for (byte bad : badTable)
{
if(myType==badTable[i])
if (myType == bad)
{
myType=0;
break;
}
i++;
if(badTable[i]==255)
break;
}
if(myType==0)
continue;
Expand Down

0 comments on commit 5c7e5ab

Please sign in to comment.