Replace fgets with fread
This commit is contained in:
parent
7ff2323dad
commit
db0de92ff8
@ -40,7 +40,7 @@ void engine_rendertarget_draw_texture(struct ENGINE_TEXTURE * texture,int x,int
|
|||||||
void engine_rendertarget_draw_file(char * fpath) {
|
void engine_rendertarget_draw_file(char * fpath) {
|
||||||
unsigned char buffer[engine_rendertarget->width * engine_rendertarget->height * 4];
|
unsigned char buffer[engine_rendertarget->width * engine_rendertarget->height * 4];
|
||||||
FILE * f = fopen(fpath,"r");
|
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);
|
fclose(f);
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user