]> git.saurik.com Git - wxWidgets.git/commitdiff
don't dereference end iterator
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 May 2008 11:22:39 +0000 (11:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 May 2008 11:22:39 +0000 (11:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/cmdline.cpp

index 787e4df468e18abe2f17381e7d970344fad84848..f05552219050af16cc5368b989b7f6b3188942a7 100644 (file)
@@ -779,15 +779,15 @@ int wxCmdLineParser::Parse(bool showUsage)
             }
             else // it's an option. not a switch
             {
-                switch ( (*p).GetValue() )
+                switch ( p == end ? '\0' : (*p).GetValue() )
                 {
-                    case _T('='):
-                    case _T(':'):
+                    case '=':
+                    case ':':
                         // the value follows
                         ++p;
                         break;
 
-                    case 0:
+                    case '\0':
                         // the value is in the next argument
                         if ( ++n == count )
                         {