bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error in test/knight.c


From: Brian Raiter
Subject: Re: error in test/knight.c
Date: Sun, 15 Oct 2000 10:37:13 -0700

There's a memory violation in knight.c if you actually manage to win
the game. Plus there's a minor mistake in the online help.

@@ -50,7 +50,7 @@
 static short   board[BDEPTH][BWIDTH];  /* the squares */
 static int     rw,col;                 /* current row and column */
 static int     lastrow,lastcol;        /* last location visited */
-static cell    history[BDEPTH*BWIDTH]; /* choice history */
+static cell    history[BDEPTH*BWIDTH+1]; /* choice history */
 static int     movecount;              /* count of moves so far */
 static WINDOW  *boardwin;              /* the board window */
@@ -156,7 +156,7 @@

     (void)waddstr(helpwin, "x,q -- exit             y k u    7 8 9\n");
     (void)waddstr(helpwin, "r -- redraw screen       \\|/      \\|/ \n");
-    (void)waddstr(helpwin, "u -- undo move          h-+-l    4-+-6\n");
+    (void)waddstr(helpwin, "bksp -- undo move       h-+-l    4-+-6\n");
     (void)waddstr(helpwin, "                         /|\\      /|\\ \n");
     (void)waddstr(helpwin, "                        b j n    1 2 3\n");

-- 
b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]