Continue with next room if the path for the arrow is found
[wumpus.git] / wumpus.c
index 3afd5680919e03d6844c30872fd13d5c22ff3f1c..f4dfe50fca6d90f60971f9e02c58fad8a001d066 100644 (file)
--- a/wumpus.c
+++ b/wumpus.c
@@ -25,6 +25,8 @@
  *
  * So, pretend for a little while that your workstation is an ASR-33 and
  * limber up your fingers for a trip to nostalgia-land...
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
  */
 
 #include <stdio.h>
@@ -353,6 +355,7 @@ badrange:
                check_shot();
                if (finished != NOT)
                    return;
+               goto nextpath;
            }
 
            /* 820 NEXT K1                                              */
@@ -366,9 +369,9 @@ badrange:
        check_shot();
 
        /* 840 NEXT K                                                   */
+       nextpath: ;
     }
 
-ammo:
     if (finished == NOT)
     {
        /* 845 PRINT "MISSED"                                           */
@@ -523,7 +526,7 @@ goodmove:
     }
 }
 
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char *argv[];
 {