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

640x400 crashes with the largest screen size #26

Closed
BSzili opened this issue Jan 9, 2021 · 0 comments
Closed

640x400 crashes with the largest screen size #26

BSzili opened this issue Jan 9, 2021 · 0 comments

Comments

@BSzili
Copy link
Contributor

BSzili commented Jan 9, 2021

There is a rounding error in BorderSetView that causes the calculated screen size off by one for 640x400 when the full screen sizes (with the minimal or no hud) are used. This line calculates 401 for y2 instead of 400 which causes a crash:
https://github.com/jonof/jfsw/blob/master/src/border.c#L441
Clamping could be added after it to work around the problem, e.g. if (y2 > ydim) y2 = ydim;

@jonof jonof closed this as completed in 0b672ee Jan 10, 2021
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

No branches or pull requests

1 participant