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 off by one int clamp in Witchery's glyph rendering #448

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

Cleptomania
Copy link
Member

Fixes a possible AIOOB caused by an int clamp being wrong in Witchery's rendering. This bug is hard to reproduce and not sure exactly where the problem comes from, but there seems to be some kind of edge case, in some combination of mods and things happening, where a glyph's metadata can be above the expected max of 11. Witchery has a clamp that prevents that would prevent that from causing an AIOOB, however the clamp is incorrect and off by one, so this makes it so the clamp at least works and prevents a crash.

See GTNewHorizons/Angelica#778 for the original crash

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Warning: 2 uncommitted changes
#449

Co-authored-by: GitHub GTNH Actions <>
@Cleptomania Cleptomania requested a review from a team December 9, 2024 21:09
@Dream-Master Dream-Master merged commit ad9680d into master Dec 9, 2024
1 check passed
@Dream-Master Dream-Master deleted the witchery-int-clamp branch December 9, 2024 21:38
Dream-Master pushed a commit that referenced this pull request Dec 10, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit ad9680d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants