OpenTTD

Tasklist

FS#5871 - Misplaced _do_autosave?

Attached to Project: OpenTTD
Opened by MJP (MJP) - Thursday, 23 January 2014, 14:57 GMT
Last edited by Remko Bijker (Rubidium) - Sunday, 09 February 2014, 20:37 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version Version?
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I believe _do_autosave is set to false 1 line too early.

1/ Definition:
bool _do_autosave; ///< are we doing an autosave at the moment?

2/ In openttd.cpp, GameLoop():
if (_do_autosave) {
_do_autosave = false;
DoAutosave();

3/ DoAutosave() calls SaveOrLoad()

4/ In saveload.cpp, SaveOrLoad() tests a value always false:
/* if not an autosave, but a user action, show error message */
if (!_do_autosave) ShowErrorMessage(STR_ERROR_SAVE_STILL_IN_PROGRESS, INVALID_STRING_ID, WL_ERROR);
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 09 February 2014, 20:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r26326. Thanks for the patch

Loading...