From db0de92ff854c73ec4fdd665ccab67f8be1e968e Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 13 Jun 2023 06:13:23 +0200 Subject: [PATCH] Replace fgets with fread --- src/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;