Fix engine_texture_from_file not using the correct length
This commit is contained in:
parent
8ead04c256
commit
298d4f1bab
@ -73,6 +73,6 @@ void engine_texture_render_2d(struct ENGINE_TEXTURE * texture,int sx,int sy) {
|
||||
|
||||
void engine_texture_from_file(struct ENGINE_TEXTURE * texture,char * fpath) {
|
||||
FILE * f = fopen(fpath,"r");
|
||||
fgets(((struct ENGINE_GENERIC_TEXTURE *)(texture->fe_texture))->pixels,texture->width * texture->height,f);
|
||||
fgets(((struct ENGINE_GENERIC_TEXTURE *)(texture->fe_texture))->pixels,texture->width * texture->height * 4,f);
|
||||
fclose(f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user