From c98e7d5b4f051d562c58e89dcc4622467e66f123 Mon Sep 17 00:00:00 2001 From: Julian Cowley Date: Sun, 6 Mar 2022 23:41:17 -1000 Subject: [PATCH] Continue with next room if the path for the arrow is found If the room specified by the user for the path of the arrow is one of the three connecting rooms, the path for the arrow is found. Continue with the next room in the path and do not consider it not able to go that way (no tunnel). Without this, the arrow flies around randomly because it drops through to the portion of the code that deals with the path not being found (no tunnel). --- wumpus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wumpus.c b/wumpus.c index b4d983c..f4dfe50 100644 --- a/wumpus.c +++ b/wumpus.c @@ -355,6 +355,7 @@ badrange: check_shot(); if (finished != NOT) return; + goto nextpath; } /* 820 NEXT K1 */ @@ -368,6 +369,7 @@ badrange: check_shot(); /* 840 NEXT K */ + nextpath: ; } if (finished == NOT) -- 2.31.1