diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index 56a71b2..89563a2 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -857,6 +857,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;