Fix a curses bug exposed by the ":numbers" display of systat -iostat.

This bug showed up when you had more than 3 devices displayed.  (thus
requiring a second line of display)

Here's a quote From the PR:

 When wrefresh() is called with a subwindow as argument, __set_subwin
 might be called with reversed arguments if wrefresh() decides to calls
 quickch().  This may cause use of negative array indexes, with a
 resulting segfault.

 Since quickch() manipulates the line structures belonging to curscr,
 it looks like all subwindows of curscr should be updated.

PR:		bin/8086
Submitted by:	Tor Egge <Tor.Egge@fast.no>
This commit is contained in:
ken 1998-10-12 16:32:32 +00:00
parent d6be4d69fc
commit 02334afb12

View File

@ -682,8 +682,8 @@ quickch(win)
* Need to repoint any subwindow lines to the rotated
* line structured.
*/
for (wp = win->nextp; wp != win; wp = wp->nextp)
__set_subwin(win, wp);
for (wp = curscr->nextp; wp != curscr; wp = wp->nextp)
__set_subwin(wp->orig, wp);
}
}