Fixed bug in function Flush().
authorMichael Bedward <mbedward@ozemail.com.au>
Mon, 16 Aug 1999 07:50:36 +0000 (07:50 +0000)
committerMichael Bedward <mbedward@ozemail.com.au>
Mon, 16 Aug 1999 07:50:36 +0000 (07:50 +0000)
It was testing for !fflush() as error

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/ffile.cpp

index 4449ec42a2c6c0a1a18ab0ba56862b311c3a7e83..e1e5a2dbe119a9111236a473034bf169784406aa 100644 (file)
@@ -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());