diff --git a/GRRLIB/GRRLIB/GRRLIB_fileIO.c b/GRRLIB/GRRLIB/GRRLIB_fileIO.c index 63ed924..062c0bf 100644 --- a/GRRLIB/GRRLIB/GRRLIB_fileIO.c +++ b/GRRLIB/GRRLIB/GRRLIB_fileIO.c @@ -48,6 +48,7 @@ int GRRLIB_LoadFile(const char* filename, unsigned char* *data) { // Get file length fseek(fd, 0, SEEK_END); if ( !(len = ftell(fd)) ) { + fclose(fd); *data = NULL; return 0; }