]> granicus.if.org Git - nethack/commitdiff
Ensure that vision is not used during done()
authornethack.allison <nethack.allison>
Wed, 6 Mar 2002 16:51:17 +0000 (16:51 +0000)
committernethack.allison <nethack.allison>
Wed, 6 Mar 2002 16:51:17 +0000 (16:51 +0000)
(and panic() which calls done())

This uses the flag that <Someone> recently added.

At least one crash in the past was caused by

? -> panic() -> done(11) -> * vision_recalc(2) -> newsym() -> crash!
if  u.ux and u.uy are 0

src/end.c

index eb226fd74d1520146a100de9152b6db0edbf54c0..a518d8d7cbefa41a146cdf612bc19478f7e1c034 100644 (file)
--- a/src/end.c
+++ b/src/end.c
@@ -582,8 +582,8 @@ die:
        program_state.gameover = 1;
        /* in case of a subsequent panic(), there's no point trying to save */
        program_state.something_worth_saving = 0;
-       /* turn off vision subsystem */
-       vision_recalc(2);
+       /* render vision subsystem inoperative */
+       iflags.vision_inited = 0;
        /* might have been killed while using a disposable item, so make sure
           it's gone prior to inventory disclosure and creation of bones data */
        inven_inuse(TRUE);