From d1b77815096cc0900f802771dfbc2bf8246882be Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Wed, 6 Mar 2002 16:51:17 +0000 Subject: [PATCH] Ensure that vision is not used during done() (and panic() which calls done()) This uses the flag that 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/end.c b/src/end.c index eb226fd74..a518d8d7c 100644 --- 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);