mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-05-06 07:15:15 +01:00
Bugfix: Bad index in tty window code.
WIN_MESSAGE isn't actually a constant and is changed to WIN_ERR (-1) in end.c, but wins[WIN_MESSAGE] was blindly checked in free_window_info(). Check to make sure WIN_MESSAGE is not WIN_ERR before indexing into wins[].
This commit is contained in:
parent
c1eccba419
commit
a28f17919a
1 changed files with 1 additions and 1 deletions
|
@ -1028,7 +1028,7 @@ free_window_info(cw, free_data)
|
|||
int i;
|
||||
|
||||
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 */
|
||||
for(i=0; i<cw->maxrow; i++)
|
||||
if(cw->data[i]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue