diff --git a/src/helpers.c b/src/helpers.c index ce16e59..9d27e86 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -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;