tuupola/hagl

Overflow bug in hagl_scale_blit

zebulon501 opened this issue · 0 comments

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];