reverted the previous fix, it's no longer needed now after the change to the default base in wxString::ToULong
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
538f35ccf4
commit
fde5a86bda
@ -440,11 +440,7 @@ static bool GetNumericToken(size_t len, const wxChar*& p, unsigned long *number)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// use the base 10 explicitly because otherwise the string "09" (the
|
return !!s && s.ToULong(number);
|
||||||
// leading zeroes are common in the date specifications) is not parsed
|
|
||||||
// correctly as, according to the standard C rules, it is understood as an
|
|
||||||
// octal number and '9' is not a valid octal digit!
|
|
||||||
return !s.empty() && s.ToULong(number, 10);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// scans all alphabetic characters and returns the resulting string
|
// scans all alphabetic characters and returns the resulting string
|
||||||
@ -3106,7 +3102,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date)
|
|||||||
|
|
||||||
// is it a number?
|
// is it a number?
|
||||||
unsigned long val;
|
unsigned long val;
|
||||||
if ( token.ToULong(&val, 10) ) // 10: see comment in GetNumericToken()
|
if ( token.ToULong(&val) )
|
||||||
{
|
{
|
||||||
// guess what this number is
|
// guess what this number is
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user