diff --git a/src/common/datetimefmt.cpp b/src/common/datetimefmt.cpp index 64bb825190..a073b3fcfc 100644 --- a/src/common/datetimefmt.cpp +++ b/src/common/datetimefmt.cpp @@ -1625,9 +1625,10 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) 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 diff --git a/tests/datetime/datetimetest.cpp b/tests/datetime/datetimetest.cpp index 90ec18c939..e21021e47a 100644 --- a/tests/datetime/datetimetest.cpp +++ b/tests/datetime/datetimetest.cpp @@ -973,6 +973,7 @@ void DateTimeTestCase::TestDateParse() { "29 Feb 2006" }, { "31/04/06" }, { "bloordyblop" }, + { "2 . . " }, }; // special cases