curses message recall, memory leaks
Using ^P right after resize or 'O' of align_message, align_status, statuslines, or windowborders would result in 'curses_display_nhmenu: attempt to display empty menu' because some memory cleanup I added several weeks back was being executed when the curses interface tore down and recreated its internal windows. This fixes ^P handling by making sure that that menu (which is just text but uses a menu to support '>'/'<'/'^'/'|' scrolling) will never be empty and it also fixes the window deletion to not throw away message history until it's final deletion at exit time. ^P uses a popup window to display previous messages and it was never deleting that window, just creating a new one each time. Same with the routine which displays an external help file. Using either or combination of both close to 5000 times would probably make internal window creation get stuck in an infinite loop. Delete those windows after they're used so it'll never be put to the test. The memory cleanup I added for map/status/messages/invent was only being preformed at end of game, not when saving. Fix that too.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.280 $ $NHDT-Date: 1553387147 2019/03/24 00:25:47 $
|
||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.281 $ $NHDT-Date: 1553475022 2019/03/25 00:50:22 $
|
||||
|
||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||
@@ -426,7 +426,7 @@ fix "placing monster over another?" warning for vault guards
|
||||
status highlighting classifies gold, time, and experience-points as data type
|
||||
'long' but when selecting hilite rule to use treated them as 'int'
|
||||
a config file line with OPTIONS=symset:default, roguesymset:RogueEpyx
|
||||
was disabling color on RogueEpyx even though the symset is
|
||||
was disabling color on RogueEpyx even though the symset is
|
||||
meant to have color; that was due to an errant init_symbols() call
|
||||
during the processing of symset:default done after RogueEpyx had
|
||||
already been processed
|
||||
@@ -494,6 +494,15 @@ curses: 'hitpointbar' now works even when status highlighting is disabled
|
||||
curses: add 'statuslines' option (value is 2 or 3)
|
||||
curses: change 'windowborders' option's value (0=Off, 1=On, or 2=Auto instead
|
||||
of 1=On, 2=Off, 3=Auto; can now be changed via 'O' during play)
|
||||
curses: free allocated memory prior to exit; previous attempt at this only
|
||||
handled game-over, not saving
|
||||
curses: the memory deallocation was releasing previous messages when curses
|
||||
interface reinitialized its main windows after resize or 'O' was used
|
||||
to set align_message, align_status, statuslines, or windowborders;
|
||||
using ^P before next new message gave a warning about empty menu
|
||||
curses: popup window to show ^P output was removed from screen but never
|
||||
deleted; further ^P's repeated that cycle; likewise for help which
|
||||
displays an external text file
|
||||
vms: add compile of isaac64.c to Makefile.src and vmsbuild.com
|
||||
vms+curses: add compile support but it is known to fail to build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user