From ec13f16ff78916836d35eeae3e4911be8b46f524 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 8 Jun 2003 18:31:57 +0000 Subject: [PATCH] U393 - unix hangups in endgame Unix code does not always go thru hangup() when EOF is encountered. There is a similar end_of_input() that is sometimes called instead, which was missing a test of program_state.something_worth_saving. --- doc/fixes34.2 | 1 + src/cmd.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 7d121dadf..89e3c5313 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -108,6 +108,7 @@ win32: some code in files.c was incorrectly assuming that a file tiles: high priest tile had a couple bad pixels tiles: bad pixels in Croesus and Yeenoghu tiles FreeBSD: incorrect srandom declaration +unix: don't autosave if hangup occurs after game is over General New Features diff --git a/src/cmd.c b/src/cmd.c index 9309ab474..dfcd57832 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2336,7 +2336,7 @@ end_of_input() { exit_nhwindows("End of input?"); #ifndef NOSAVEONHANGUP - if (!program_state.done_hup++) + if (!program_state.done_hup++ && program_state.something_worth_saving) (void) dosave0(); #endif clearlocks(); -- 2.40.0