This is similar to the previous commit and adds another missed check for the
iterator not being at the end of string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70847
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
break;
case wxT('%'): // a percent sign
- if ( *input++ != wxT('%') )
+ if ( input == end || *input++ != wxT('%') )
{
// no match
return false;
// test some degenerate cases
CPPUNIT_ASSERT( !dt.ParseFormat("", "%z") );
+ CPPUNIT_ASSERT( !dt.ParseFormat("", "%%") );
// test compilation of some calls which should compile (and not result in
// ambiguity because of char*<->wxCStrData<->wxString conversions)