read numbers even if they're followed by spaces
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -865,12 +865,14 @@ bool wxFileConfig::DoReadString(const wxString& key, wxString* pStr) const
|
|||||||
|
|
||||||
bool wxFileConfig::DoReadLong(const wxString& key, long *pl) const
|
bool wxFileConfig::DoReadLong(const wxString& key, long *pl) const
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
if ( !Read(key, & str) )
|
if ( !Read(key, &str) )
|
||||||
{
|
return FALSE;
|
||||||
return FALSE;
|
|
||||||
}
|
// extra spaces shouldn't prevent us from reading numeric values
|
||||||
return str.ToLong(pl) ;
|
str.Trim();
|
||||||
|
|
||||||
|
return str.ToLong(pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFileConfig::DoWriteString(const wxString& key, const wxString& szValue)
|
bool wxFileConfig::DoWriteString(const wxString& key, const wxString& szValue)
|
||||||
|
Reference in New Issue
Block a user