Parsing an incomplete date with nothing but whitespace and/or date delimiter
characters at the end crashed as we happily went beyond the end of string.
Fix this by not using a loop which didn't check for the iterator validity.
Closes #12685.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66166
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
while ( p != pEnd )
{
// skip white space and date delimiters
- while ( wxStrchr(".,/-\t\r\n ", *p) )
+ if ( wxStrchr(".,/-\t\r\n ", *p) )
{
++p;
+ continue;
}
// modify copy of the iterator as we're not sure if the next token is
{ "29 Feb 2006" },
{ "31/04/06" },
{ "bloordyblop" },
+ { "2 . . " },
};
// special cases