From c2697a94731a66066be89d7672d5cc5237cc72a3 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 10 Jan 2019 23:55:30 +0800 Subject: [PATCH] Flush the buffer after write. --- file_io.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file_io.cpp b/file_io.cpp index 576ad21..8ab227d 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -613,6 +613,8 @@ int FileWriteAdv(fileTYPE *file, void *pBuffer, int length) if (file->filp) { ret = fwrite(pBuffer, length, 1, file->filp); + fflush(file->filp); + if (ret < 0) { printf("FileWriteAdv error(%d).\n", ret);