Fix underflow in free_window_info
At the end this is called after `WIN_MESSAGE` is reset to `-1`, so we need a check here.
This commit is contained in:
@@ -1769,7 +1769,8 @@ free_window_info(struct WinDesc *cw, boolean free_data)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (cw->data) {
|
if (cw->data) {
|
||||||
if (cw == wins[WIN_MESSAGE] && cw->rows > cw->maxrow)
|
if (WIN_MESSAGE != WIN_ERR && cw == wins[WIN_MESSAGE]
|
||||||
|
&& cw->rows > cw->maxrow)
|
||||||
cw->maxrow = cw->rows; /* topl data */
|
cw->maxrow = cw->rows; /* topl data */
|
||||||
for (i = 0; i < cw->maxrow; i++)
|
for (i = 0; i < cw->maxrow; i++)
|
||||||
if (cw->data[i]) {
|
if (cw->data[i]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user