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:
@@ -910,7 +910,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
|||||||
{
|
{
|
||||||
// a white space in the format string matches 0 or more white
|
// a white space in the format string matches 0 or more white
|
||||||
// spaces in the input
|
// spaces in the input
|
||||||
while ( wxIsspace(*input) )
|
while ( input != end && wxIsspace(*input) )
|
||||||
{
|
{
|
||||||
input++;
|
input++;
|
||||||
}
|
}
|
||||||
@@ -919,7 +919,7 @@ wxDateTime::ParseFormat(const wxString& date,
|
|||||||
{
|
{
|
||||||
// any other character (not whitespace, not '%') must be
|
// any other character (not whitespace, not '%') must be
|
||||||
// matched by itself in the input
|
// matched by itself in the input
|
||||||
if ( *input++ != *fmt )
|
if ( input == end || *input++ != *fmt )
|
||||||
{
|
{
|
||||||
// no match
|
// no match
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user