don't dereference end iterator (closes #10656)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6df09f32fd
commit
694cb6c581
@ -910,7 +910,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
||||
{
|
||||
// a white space in the format string matches 0 or more white
|
||||
// spaces in the input
|
||||
while ( wxIsspace(*input) )
|
||||
while ( input != end && wxIsspace(*input) )
|
||||
{
|
||||
input++;
|
||||
}
|
||||
@ -919,7 +919,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
||||
{
|
||||
// any other character (not whitespace, not '%') must be
|
||||
// matched by itself in the input
|
||||
if ( *input++ != *fmt )
|
||||
if ( input == end || *input++ != *fmt )
|
||||
{
|
||||
// no match
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user