]> granicus.if.org Git - nethack/commitdiff
It was possible to terminate the win32 ports late in the user
authornethack.allison <nethack.allison>
Mon, 1 Jul 2002 12:28:14 +0000 (12:28 +0000)
committernethack.allison <nethack.allison>
Mon, 1 Jul 2002 12:28:14 +0000 (12:28 +0000)
save process, after the save file had already been written by
forcing execution of an interrupt handler at one of the
termination prompts.  This resulted in "You were not healthy
enough to survive restoration" and worse.

This clears program_state.something_worth_saving immediately
after the save has been completed.

src/save.c

index 31f347a95cfd722382eb9ca0ff4acd19309210e1..a8f5272f0517514113a5055d27b90a4db0b3d385 100644 (file)
@@ -66,6 +66,7 @@ dosave()
                program_state.done_hup = 0;
 #endif
                if(dosave0()) {
+                       program_state.something_worth_saving = 0;
                        u.uhp = -1;             /* universal game's over indicator */
                        /* make sure they see the Saving message */
                        display_nhwindow(WIN_MESSAGE, TRUE);