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

Overflow bug in hagl_scale_blit #49

Closed
zebulon501 opened this issue Sep 11, 2021 · 0 comments
Closed

Overflow bug in hagl_scale_blit #49

zebulon501 opened this issue Sep 11, 2021 · 0 comments
Assignees

Comments

@zebulon501
Copy link

If the source bitmap has more than 256 pixels, the scaling produces a wrong result due to a bad cast:

color = ptr[(uint8_t)((py * source->width) + px)];

Should be:

color = ptr[(py * source->width) + px];
@tuupola tuupola self-assigned this Sep 11, 2021
tuupola added a commit that referenced this issue Feb 4, 2023
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

2 participants