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 draw_critter_above bounds check #73756

Merged
merged 1 commit into from
May 14, 2024

Conversation

mischief
Copy link
Contributor

Summary

Bugfixes "fix draw_critter_above bounds check"

Purpose of change

when walking up the z levels, make sure we don't go out of bounds in the caches.

PR #73653 tried to fix this, but the check needs to happen before we index the cache array by z-level, not after.

fixes #73754.

Describe the solution

Describe alternatives you've considered

Testing

#73754 (comment) no longer crashes.

Additional context

when walking up the z levels, make sure we don't go out of bounds in the
caches.

PR CleverRaven#73653 tried to fix this, but the check needs to happen before we
index the cache array by z-level, not after.

fixes CleverRaven#73754.
@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels May 14, 2024
Copy link
Member

@RenechCDDA RenechCDDA left a comment

Choose a reason for hiding this comment

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

Yeah that does make sense.

@dseguin dseguin merged commit b67f204 into CleverRaven:master May 14, 2024
23 of 28 checks passed
@mischief mischief deleted the critter-bounds branch May 14, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

out of bounds array access to map cache in cata_tiles::draw_critter_above
3 participants