diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index 0a30f81..1660c39 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -858,6 +858,7 @@ SaveFile (char * buffer, char *filepath, size_t datasize, bool silent) if(writesize != nextwrite) break; // write failure written += writesize; } + fclose (file); if(written != datasize) written = 0;