Skip to content

bugfix(crc): Prevent division by zero in CRC interval calculation#429

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/crc-div-by-zero
Open

bugfix(crc): Prevent division by zero in CRC interval calculation#429
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/crc-div-by-zero

Conversation

@seer-by-sentry
Copy link
Copy Markdown

Fixes CLIENT-1AA. The issue was that: The GameLogic::update method crashes due to integer division by zero when TheGameInfo->getCRCInterval() returns zero.

  • Added null-check for TheGameInfo before retrieving the CRC interval to prevent potential null pointer dereferences.
  • Ensured that the CRC interval is greater than zero before performing the modulo operation to prevent division by zero errors.
  • Modified setCRCInterval to clamp the minimum CRC interval value to 1, guaranteeing that getCRCInterval() will never return zero.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 12521082

Not quite right? Click here to continue debugging with Seer.

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.

0 participants