Fix unigi_ext_texture_open
This commit is contained in:
parent
d8789b7689
commit
8286d50145
4
main.c
4
main.c
@ -63,8 +63,8 @@ void unigi_ext_texture_destroy(unigi_ext_type_texture * texture) {
|
||||
unigi_ext_type_texture * unigi_ext_texture_open(char * path) {
|
||||
int fd = open(path,O_RDONLY);
|
||||
if (fd == -1) { goto fail; }
|
||||
unigi_ext_type_2d_coord width;
|
||||
unigi_ext_type_2d_coord height;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
if (read(fd,&width,sizeof(uint16_t)) != sizeof(uint16_t)) { goto fail_file; }
|
||||
if (read(fd,&height,sizeof(uint16_t)) != sizeof(uint16_t)) { goto fail_file; }
|
||||
unigi_ext_type_texture * texture = unigi_ext_texture_create(width,height);
|
||||
|
Loading…
Reference in New Issue
Block a user