Skip to content

Validate font height metrics to prevent division by zero - #221

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/font-height-div-by-zero
Open

Validate font height metrics to prevent division by zero#221
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/font-height-div-by-zero

Conversation

@seer-by-sentry

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

Copy link
Copy Markdown

Fixes CLIENT-1P6. The issue was that: Invalid font metrics from GDI set CharHeight to -1, causing division by zero in Allocate_New_Surface's texture calculation.

  • Added checks to ensure font character height variables are greater than zero before use in calculations.
  • Sets height to 1 if the retrieved font height is 0 or negative, mitigating potential division by zero errors caused by corrupted font data.

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

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