From 5c7e5abfbe4a8546b9298627e946658d06eeadce Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Thu, 25 Jul 2024 18:33:47 -0700 Subject: [PATCH] LL: Fix infinite loop in new Suprise Mode code --- source/loonyland/guy.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/loonyland/guy.cpp b/source/loonyland/guy.cpp index a8563782..b94cff92 100644 --- a/source/loonyland/guy.cpp +++ b/source/loonyland/guy.cpp @@ -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;