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 a crash with pre-existing campsite #104

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

plule
Copy link
Contributor

@plule plule commented Apr 8, 2024

Fix a possible crash when entering GetTerrainSpriteMap with an unsupported form. This would leave tempform uninitialized, later leading to an out of bound access. At the moment the fix is to just return the default sprite.

Note: I am completely unfamiliar with the codebase, and was not able to understand this situation "in context", so maybe there is a better way to fix that.

In my crash, I had:

material={type=426 index=27}
form=58

Which would translate to the material PLANT:FLAX:THREAD/linen and form would be CLOTH?

On my map they come from some pre-existing campsite and crashes as soon as one of the "tent" is in sight. This change is likely a fix for #75 given how similar the situation is.

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a changelog.txt entry in the DFHack/dfhack repo?

@myk002 myk002 merged commit bf64c9a into DFHack:master Apr 9, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants