diff --git a/modules/engine/frontend/generic/textures.c b/modules/engine/frontend/generic/textures.c index e290831..52bee94 100644 --- a/modules/engine/frontend/generic/textures.c +++ b/modules/engine/frontend/generic/textures.c @@ -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); }