]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ncurses.c
ncurses 5.7 - patch 20100306
[ncurses.git] / test / ncurses.c
index eff12d4b3d2cdda47b61bd7d2bada99e8d1605d9..47125f7a81a3062cd2ebfac70a2a2c69b4f30fb0 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.355 2010/01/09 16:52:17 tom Exp $
+$Id: ncurses.c,v 1.356 2010/03/06 18:45:14 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -4761,12 +4761,13 @@ panner_legend(int line)
        "Number repeats.  Toggle legend:? filler:a timer:t scrollmark:s."
     };
     int n = ((int) SIZEOF(legend) - (LINES - line));
        "Number repeats.  Toggle legend:? filler:a timer:t scrollmark:s."
     };
     int n = ((int) SIZEOF(legend) - (LINES - line));
-    if (line < LINES && (n >= 0)) {
-       move(line, 0);
-       if (show_panner_legend)
-           printw("%s", legend[n]);
-       clrtoeol();
-       return show_panner_legend;
+    if (n >= 0) {
+       if (move(line, 0) != ERR) {
+           if (show_panner_legend)
+               printw("%s", legend[n]);
+           clrtoeol();
+           return show_panner_legend;
+       }
     }
     return FALSE;
 }
     }
     return FALSE;
 }