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.
This commit is contained in:
cohrs
2003-06-08 18:31:57 +00:00
parent e33b62192c
commit ec13f16ff7
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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();