Replace fgets with fread

This commit is contained in:
Fierelier 2023-06-13 06:13:23 +02:00
parent 7ff2323dad
commit db0de92ff8

View File

@ -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;