X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fmovewindow.c;h=e55a694a084a2842cb721d6a692f028d6b7b5e28;hp=e807a8a064b558ca6534efc447fea4408a7ee69d;hb=bd257b9d8d715a9a63dab215fcdc53f106e7d050;hpb=92e187a3459ab7ce1613a3684ca6642447c73620 diff --git a/test/movewindow.c b/test/movewindow.c index e807a8a0..e55a694a 100644 --- a/test/movewindow.c +++ b/test/movewindow.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: movewindow.c,v 1.23 2010/05/01 19:11:55 tom Exp $ + * $Id: movewindow.c,v 1.24 2010/11/13 23:34:55 tom Exp $ * * Demonstrate move functions for windows and derived windows from the curses * library. @@ -311,7 +311,7 @@ next_window(WINDOW *win) int n = window2num(win); if (n++ >= 0) { - result = all_windows[n % num_windows].child; + result = all_windows[(unsigned) n % num_windows].child; wmove(result, 0, 0); wrefresh(result); } @@ -326,8 +326,8 @@ prev_window(WINDOW *win) if (n-- >= 0) { if (n < 0) - n = num_windows - 1; - result = all_windows[n % num_windows].child; + n = (int) (num_windows - 1); + result = all_windows[(unsigned) n % num_windows].child; wmove(result, 0, 0); wrefresh(result); }