Files
nethack/include
PatR 3e0d029a45 fix #H9164 - crash during restore when swallowed
Subject was "display crash while in curses mode".  Restoring with
perm_invent set in config file or NETHACKOPTIONS when the save was
made while swallowed (regardless of perm_invent at that time) resulted
in a crash when invalid u.ustuck was referenced before restoration had
done its pointer fixups.

init_nhwindows() is called with perm_invent On;
restgamestate() temporarily turns it Off (3.6.2 restore hack);
if/when update_inventory() gets called, curses notices that the
persistent window has been disabled so it tears down all its windows
in order to redraw the screen without that one;
docrt() sees non-Null u.ustuck and calls swallowed();
swallowed() tries to use the value of that pointer rather than just
Null/non-Null but the value is from the previous game session, not
valid for the current session;
crash.

Make yet another attempt to prevent update_inventory() from being
called during restore.  curses won't try to redraw and the crash
won't happen.  But the invalid pointer is still lurking (until an
eventual fixup later during restore).

An earlier fix for update_inventory() during restore actually handled
this problem (for the most common trigger, setworn(), but not in
general), so the 3.6.2 behavior is a regression.
2019-08-30 18:11:43 -07:00
..
2018-11-11 10:29:52 -05:00
2018-09-10 21:13:10 +03:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2019-07-28 15:06:02 -07:00
2016-10-10 16:18:20 +03:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:15 +09:00
2019-04-06 15:53:51 -07:00
2015-10-17 13:15:46 +03:00
2019-04-19 12:42:35 -07:00
2018-04-25 15:00:13 -04:00
2018-04-25 15:00:13 -04:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2019-06-08 04:50:40 -07:00
2019-05-12 14:51:26 -04:00
2018-04-25 15:00:13 -04:00
2019-07-14 21:10:39 -07:00
2018-12-15 19:31:42 -05:00
2015-05-25 09:21:15 +09:00
2019-07-14 21:15:54 -07:00
2019-06-23 21:39:22 -07:00
2019-03-06 11:37:52 -08:00
2019-01-28 10:02:08 +01:00
2018-04-25 15:00:13 -04:00
2018-04-25 16:54:50 -04:00
2015-05-25 09:21:15 +09:00
2018-04-25 15:00:13 -04:00
2018-04-25 15:00:13 -04:00
2015-10-17 13:15:46 +03:00
2015-11-17 02:26:17 -08:00
2018-04-25 15:00:13 -04:00
2018-04-25 16:54:50 -04:00
2019-01-13 17:19:39 -08:00
2018-04-25 15:00:13 -04:00
2018-04-25 16:54:50 -04:00
2019-06-18 02:43:41 -07:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2019-06-20 10:59:48 -07:00
2019-01-13 17:19:39 -08:00
2015-05-25 09:21:31 +09:00
2018-04-25 15:00:13 -04:00
2019-01-11 17:18:48 -08:00
2018-10-20 23:14:33 -04:00
2019-01-14 17:10:46 -08:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2015-11-17 02:26:17 -08:00
2017-10-10 21:47:35 +03:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2015-10-17 18:47:31 +03:00
2019-06-08 04:50:40 -07:00
2019-01-11 17:18:48 -08:00
2018-12-15 19:27:08 -08:00
2015-05-25 09:21:31 +09:00
2019-02-15 14:10:09 -08:00
2018-04-25 15:00:13 -04:00
2018-04-25 16:54:50 -04:00
2019-07-27 16:12:24 -07:00
2018-04-25 15:00:13 -04:00
2019-04-15 13:48:27 -07:00
2019-01-11 17:18:48 -08:00
2019-06-08 04:50:40 -07:00
2019-04-15 13:48:27 -07:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2019-02-04 16:46:04 -08:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2019-01-14 17:10:46 -08:00