If the string passed to this method contained only spaces (possibly 0 of them,
i.e. was empty) we would dereference the end string iterator. Fix this by
adding an explicit test for "p != pEnd".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63060
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
const wxString::const_iterator pEnd = date.end();
wxString::const_iterator p = pBegin;
const wxString::const_iterator pEnd = date.end();
wxString::const_iterator p = pBegin;
- while ( wxIsspace(*p) )
+ while ( p != pEnd && wxIsspace(*p) )
p++;
// some special cases
p++;
// some special cases