]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdline.cpp
fix the test for !wxUSE_UNICODE_UTF8 builds: don't suppose that strings are UTF-8...
[wxWidgets.git] / src / common / cmdline.cpp
index b1521082b6c012761793320c69d5241ebdf824e3..c0a7e4131c1fe19717173c52fe38302eb878f167 100644 (file)
@@ -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 != value.end() )
                                 {
                                     errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."),
                                                                  name.c_str(), value.c_str())