diff --git a/src/helpers.c b/src/helpers.c index 9d27e86..a7a2c93 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -40,7 +40,7 @@ void engine_rendertarget_draw_texture(struct ENGINE_TEXTURE * texture,int x,int void engine_rendertarget_draw_file(char * fpath) { unsigned char buffer[engine_rendertarget->width * engine_rendertarget->height * 4]; FILE * f = fopen(fpath,"r"); - fgets(buffer,engine_rendertarget->width * engine_rendertarget->height * 4,f); + fread(buffer,engine_rendertarget->width * engine_rendertarget->height * 4,1,f); fclose(f); int x = 0; int y = 0;