X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b6a582bef796b43ad4cf0a96bd40bfd631460c6..c753eb9269d1e6c99b80a2d782ce49d9864ac1da:/src/common/cmdline.cpp diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index b1521082b6..dec8be85fc 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -869,8 +869,8 @@ int wxCmdLineParser::Parse(bool showUsage) case wxCMD_LINE_VAL_DATE: { wxDateTime dt; - const char *res = dt.ParseDate(value); - if ( !res || *res ) + wxString::const_iterator end; + if ( !dt.ParseDate(value, &end) || end != value.end() ) { errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."), name.c_str(), value.c_str())