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:
@@ -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: high priest tile had a couple bad pixels
|
||||||
tiles: bad pixels in Croesus and Yeenoghu tiles
|
tiles: bad pixels in Croesus and Yeenoghu tiles
|
||||||
FreeBSD: incorrect srandom declaration
|
FreeBSD: incorrect srandom declaration
|
||||||
|
unix: don't autosave if hangup occurs after game is over
|
||||||
|
|
||||||
|
|
||||||
General New Features
|
General New Features
|
||||||
|
|||||||
@@ -2336,7 +2336,7 @@ end_of_input()
|
|||||||
{
|
{
|
||||||
exit_nhwindows("End of input?");
|
exit_nhwindows("End of input?");
|
||||||
#ifndef NOSAVEONHANGUP
|
#ifndef NOSAVEONHANGUP
|
||||||
if (!program_state.done_hup++)
|
if (!program_state.done_hup++ && program_state.something_worth_saving)
|
||||||
(void) dosave0();
|
(void) dosave0();
|
||||||
#endif
|
#endif
|
||||||
clearlocks();
|
clearlocks();
|
||||||
|
|||||||
Reference in New Issue
Block a user