Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: Prevent Dawn Of screen crashing with 4th day glitch #718

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Jun 25, 2024

The "Dawn Of" screen would crash with the 4th day glitch due to an OOB read for the textures with the hours remaining text. Adding another entry at the end of this array with our empty texture fix prevents the crash and replicates console behavior of nothing rendering there.

This happens because the CURRENT_DAY macro mods the day value with 5 and then in the Dawn Of screen, the macro value is subtracted by 1. So a value of 3 is used to index all the texture arrays. The Dawn Of arrays already have a 4th entry for the "New Day" textures.

Because the 4th day glitch always repeats the 4th day and doesn't increment the day value means we don't have to worry about an index of 4 going into these arrays.

Build Artifacts

@Archez Archez added the rika label Jun 25, 2024
@louist103 louist103 merged commit 72f6fd1 into HarbourMasters:develop-rika Jun 26, 2024
5 checks passed
@Archez Archez deleted the fix-4th-day-dawnof branch June 26, 2024 03:46
mckinlee pushed a commit to mckinlee/2ship2harkinian that referenced this pull request Oct 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants