From: Michael Bedward Date: Mon, 16 Aug 1999 07:50:36 +0000 (+0000) Subject: Fixed bug in function Flush(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5b96c684f386b40a4fa13aef4665dd77db3cb919 Fixed bug in function Flush(). It was testing for !fflush() as error git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/ffile.cpp b/src/common/ffile.cpp index 4449ec42a2..e1e5a2dbe1 100644 --- a/src/common/ffile.cpp +++ b/src/common/ffile.cpp @@ -167,7 +167,9 @@ bool wxFFile::Flush() { if ( IsOpened() ) { - if ( !fflush(m_fp) ) + // fflush returns non-zero on error + // + if ( fflush(m_fp) ) { wxLogSysError(_("failed to flush the file '%s'"), m_name.c_str());