Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7925: Reset temporary saveload data at the start of loading. #7932

Merged
merged 1 commit into from Jan 12, 2020

Conversation

frosch123
Copy link
Member

Bug #7925 caused this behaviour:

  • Loading the savegame involved calling Load_RAIL, which filled _railtype_list.
  • Loading was aborted before AfterLoadLabelMaps, so _railtype_list was not cleared.
  • The titlegame is old and does not contain a RAIL chunk, and thus LOAD_RAIL was not called.
  • Thus the titlegame's AfterLoadLabelMaps used the _railtype_list from the aborted savegame.

Funnily noone bothered to add the equivalent of AfterLoadLabelMaps for road types, so an alternative fix may be to just delete it.

…ng a savegame instead of at the end.

Otherwise temporary data may be passed from an aborted load action to the next load action.
@James103
Copy link
Contributor

@LordAro Why didn't you merge this already? You already approved and all checks passed.

@nielsmh nielsmh merged commit a4be451 into OpenTTD:master Jan 12, 2020
@frosch123 frosch123 deleted the fix7925 branch January 12, 2020 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants