]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
Compilation fix for Innotek gcc.
[wxWidgets.git] / src / common / fileconf.cpp
index 1c0337284ef66bff06f7512ae2a824e101124013..4dc63b3adaf21f01bdee824dba6d26fb756ae26e 100644 (file)
@@ -494,21 +494,21 @@ wxFileConfig::wxFileConfig(wxInputStream &inStream, wxMBConv& conv)
         wxString strTmp;
 
         char buf[1024];
-        for ( ;; )
+        do
         {
             inStream.Read(buf, WXSIZEOF(buf));
 
-            if ( !inStream.IsOk() )
+            const wxStreamError err = inStream.GetLastError();
+
+            if ( err != wxSTREAM_NO_ERROR && err != wxSTREAM_EOF )
             {
                 wxLogError(_("Error reading config options."));
                 break;
             }
 
             strTmp.append(wxConvertMB2WX(buf), inStream.LastRead());
-
-            if ( inStream.Eof() )
-                break;
         }
+        while ( !inStream.Eof() );
 
         strTrans = wxTextBuffer::Translate(strTmp);
     }
@@ -663,7 +663,7 @@ void wxFileConfig::Parse(wxTextBuffer& buffer, bool bLocal)
     }
     else {                        // a key
       const wxChar *pEnd = pStart;
-      while ( *pEnd && *pEnd != wxT('=') && !wxIsspace(*pEnd) ) {
+      while ( *pEnd && *pEnd != wxT('=') /* && !wxIsspace(*pEnd)*/ ) {
         if ( *pEnd == wxT('\\') ) {
           // next character may be space or not - still take it because it's
           // quoted (unless there is nothing)