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 error when loading proficiencies from save #42670

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

Qrox
Copy link
Contributor

@Qrox Qrox commented Aug 3, 2020

Summary

SUMMARY: Bugfixes "Fix error when loading proficiencies from save"

Purpose of change

Looks like #42476 updated how proficiencies are saved but didn't actually update the save version when merged (perhaps some other PR also changed the save version to 31, which the merge tool thinks can just be merged safely but actually cannot be), so saves created in version 31 saved proficiencies as an array but the code tries to read an object for version > 30.

Describe the solution

Since both an array and an object can be saved in version 31 saves, we can only read according to whether the saved proficiencies are an array or object now.

Testing

Save now loads.

Additional context

We might want to find a way to avoid this kind of merge error.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world labels Aug 3, 2020
@ZhilkinSerg ZhilkinSerg merged commit 782fe12 into CleverRaven:master Aug 3, 2020
@anothersimulacrum
Copy link
Member

Thanks for getting this.
It looks like #42277 also adjusted the version, and the merge tools didn't mark that as a conflict.

@Qrox Qrox deleted the fix-save-loading branch August 5, 2020 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants