From 97f6834730c53204ace1b9a9d483a897e406dff6 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 15 Apr 2015 20:06:38 +0300 Subject: [PATCH] Prevent infinite loop ...if the map is filled with monsters, and for some reason the drowning just won't kill you. Infinite looping cannot currently happen, because no-one who can drown can keep surviving the drowning once their amulet of life saving is used up. --- src/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trap.c b/src/trap.c index aff2b9719..037c73255 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3470,7 +3470,7 @@ drown() } u.uinwater = 1; You("drown."); - for (;;) { + for (i = 0; i < 5; i++) { /* arbitrary number of loops */ /* killer format and name are reconstructed every iteration because lifesaving resets them */ pool_of_water = waterbody_name(u.ux, u.uy); -- 2.40.0