From 694cb6c5819c59bc104619d3dc3b6c0f18e80ea9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Mar 2009 21:04:55 +0000 Subject: [PATCH] don't dereference end iterator (closes #10656) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetimefmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/datetimefmt.cpp b/src/common/datetimefmt.cpp index 39f6ddae73..91d6452981 100644 --- a/src/common/datetimefmt.cpp +++ b/src/common/datetimefmt.cpp @@ -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; -- 2.45.2