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 1 commit into from Jan 12, 2020


Copy link

frosch123 commented Jan 12, 2020

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.

…vegame instead of at the end.

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

James103 commented Jan 12, 2020

@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
8 checks passed
8 checks passed
OpenTTD CI Build #20200112.19 succeeded
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
OpenTTD CI (Linux linux-amd64-clang-3.9) Linux linux-amd64-clang-3.9 succeeded
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
OpenTTD CI (MacOS) MacOS succeeded
OpenTTD CI (Windows Win32) Windows Win32 succeeded
OpenTTD CI (Windows Win64) Windows Win64 succeeded
@frosch123 frosch123 deleted the frosch123:fix7925 branch Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.