Skip to content

Clamp gamma value to valid range to prevent crashes/invalid calculations - #218

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/clamp-gamma-value
Open

Clamp gamma value to valid range to prevent crashes/invalid calculations#218
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/clamp-gamma-value

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 4, 2026

Copy link
Copy Markdown

Fixes CLIENT-1KZ. The issue was that: Corrupted user preference value causes Windows system library to execute integer division by zero during runtime class initialization.

  • Clamped the gamma value read from Options.ini in OptionsMenu.cpp (Generals and GeneralsMD) between 0.0f and 100.0f to prevent crashes from corrupted configuration files.
  • Clamped the integer gamma value used in GlobalData.cpp (Generals and GeneralsMD) between 0 and 100 to prevent division by zero or invalid calculations during gamma adjustment logic.

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

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