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:
Kenneth D. Merry 1998-10-12 16:32:32 +00:00
parent aea68bce9f
commit 13a5277c23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40261

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);
}
}