Fix two minor bugs, one in the shove code and one in debugme().
[super-star-trek.git] / src / sst.c
index 7fbbfc2ef558af029e37e827537410314a35ef4f..021e3d9bef3885a69f8c290e46043ca4d6b9b5ab 100644 (file)
--- a/src/sst.c
+++ b/src/sst.c
@@ -909,20 +909,23 @@ void debugme(void)
                    chew();
                    proutn("In quadrant- ");
                    key = scan();
-                   if (key != IHREAL) {
-                       prout("Event %d canceled, no y coordinate.", i);
-                       unschedule(i);
-                       continue;
+                   /* IHEOL says to leave coordinates as they are */
+                   if (key != IHEOL) {
+                       if (key != IHREAL) {
+                           prout("Event %d canceled, no x coordinate.", i);
+                           unschedule(i);
+                           continue;
+                       }
+                       w.x = (int)aaitem;
+                       key = scan();
+                       if (key != IHREAL) {
+                           prout("Event %d canceled, no y coordinate.", i);
+                           unschedule(i);
+                           continue;
+                       }
+                       w.y = (int)aaitem;
+                       ev->quadrant = w;
                    }
-                   w.y = (int)aaitem;
-                   key = scan();
-                   if (key != IHREAL) {
-                       prout("Event %d canceled, no x coordinate.", i);
-                       unschedule(i);
-                       continue;
-                   }
-                   w.x = (int)aaitem;
-                   ev->quadrant = w;
                }
            }
        }