diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index f3f0adb..4f74841 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -856,6 +856,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;