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 item_location (de)serialization handling #35593

Merged
merged 1 commit into from
Nov 18, 2019

Conversation

ifreund
Copy link
Contributor

@ifreund ifreund commented Nov 18, 2019

Summary

SUMMARY: Bugfixes "Fix item_location (de)serialization handling"

Purpose of change

Fixes #35584

Describe the solution

  • Write a null item location if we failed to unpack the character
    pointer to avoid invalid json.
  • Assume g->u was the character if there is no character field on
    deserialization since all character item locations were on g->u
    before the character field was introduced.

Testing

Saves from before 8d5b04e can be loaded without error with these changes

Write a null item location if we failed to unpack the character
pointer to avoid invalid json.
Assume g->u was the character if there is no character field on
deserialization since all character item locations were on g->u
before the character field was introduced.
@ifreund ifreund added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels Nov 18, 2019
@ZhilkinSerg ZhilkinSerg merged commit dfe83da into CleverRaven:master Nov 18, 2019
@ifreund ifreund deleted the migrate-item-locs branch November 18, 2019 23:31
@Funguss
Copy link
Contributor

Funguss commented Nov 20, 2019

Issue with old worlds where an NPC is reading. On the turn they increase their skill there's a CTD. No biggie, just tell them to stop reading. In case anybody else gets this (rare) issue any time soon. Brilliant job fixing this so quickly! 👍

@ifreund
Copy link
Contributor Author

ifreund commented Nov 20, 2019

Thanks! I am the one who caused the issue after all...

Sounds like that CTD is actually a leftover manifestation of the original issue #35352. Not really anything that could be done about in progress reading activities unfortunately, but any new ones should go smoothly.

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`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save breaking bug on build 9908
3 participants