initialization bug (from muller@nprdc.arpa)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 24 Sep 1985 04:19:04 +0000 (20:19 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 24 Sep 1985 04:19:04 +0000 (20:19 -0800)
SCCS-vsn: games/robots/play_level.c 5.2

usr/src/games/robots/play_level.c

index 2380700..7fab99b 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)play_level.c       5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)play_level.c       5.2 (Berkeley) %G%";
 #endif not lint
 
 # include      "robots.h"
 #endif not lint
 
 # include      "robots.h"
@@ -23,6 +23,8 @@ play_level()
        addch(PLAYER);
        refresh();
        for (cp = Robots; cp < &Robots[MAXROBOTS]; cp++) {
        addch(PLAYER);
        refresh();
        for (cp = Robots; cp < &Robots[MAXROBOTS]; cp++) {
+               if (cp->y < 0)
+                       continue;
                move(cp->y, cp->x);
                addch(ROBOT);
        }
                move(cp->y, cp->x);
                addch(ROBOT);
        }