]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
OpenGL for GTK2 fixes.
[wxWidgets.git] / src / common / fileconf.cpp
index fb05de0a4c446f2e2d977df896c941fce8fc86c3..36537f99cffb477f4756670b1c5b02a98705b518 100644 (file)
@@ -865,12 +865,14 @@ bool wxFileConfig::DoReadString(const wxString& key, wxString* pStr) const
 
 bool wxFileConfig::DoReadLong(const wxString& key, long *pl) const
 {
-  wxString str;
-  if ( !Read(key, & str) )
-  {
-    return FALSE;
-  }
-  return str.ToLong(pl) ;
+    wxString str;
+    if ( !Read(key, &str) )
+        return FALSE;
+
+    // extra spaces shouldn't prevent us from reading numeric values
+    str.Trim();
+
+    return str.ToLong(pl);
 }
 
 bool wxFileConfig::DoWriteString(const wxString& key, const wxString& szValue)