Fix colorindex

This commit is contained in:
Fierelier 2023-06-13 06:12:57 +02:00
parent 793c86720c
commit 7ff2323dad

View File

@ -47,7 +47,7 @@ void engine_rendertarget_draw_file(char * fpath) {
int colorindex = 0;
while (y < engine_rendertarget->height) {
while (x < engine_rendertarget->width) {
colorindex = x + y * engine_rendertarget->width * 4;
colorindex = (x + (y * engine_rendertarget->width)) * 4;
engine_color_set(buffer[colorindex],buffer[colorindex+1],buffer[colorindex+2],buffer[colorindex+3]);
engine_rendertarget_draw_point(x,y);
x += 1;