Fix RenderBackend_ColourFill for 4-byte pixel format

This commit is contained in:
John Lorentzson 2025-04-07 00:16:03 +02:00
parent 8d840d89ea
commit 022144d727

View file

@ -240,7 +240,7 @@ ATTRIBUTE_HOT void RenderBackend_ColourFill(RenderBackend_Surface *surface, cons
for (long j = 0; j < rect_clamped.bottom - rect_clamped.top; ++j)
{
unsigned char *destination_pointer = &surface->pixels[((rect_clamped.top + j) * surface->pitch) + (rect_clamped.left * 3)];
unsigned char *destination_pointer = &surface->pixels[((rect_clamped.top + j) * surface->pitch) + (rect_clamped.left * 4)];
for (long i = 0; i < rect_clamped.right - rect_clamped.left; ++i)
{