don't dereference end iterator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -779,15 +779,15 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
}
|
}
|
||||||
else // it's an option. not a switch
|
else // it's an option. not a switch
|
||||||
{
|
{
|
||||||
switch ( (*p).GetValue() )
|
switch ( p == end ? '\0' : (*p).GetValue() )
|
||||||
{
|
{
|
||||||
case _T('='):
|
case '=':
|
||||||
case _T(':'):
|
case ':':
|
||||||
// the value follows
|
// the value follows
|
||||||
++p;
|
++p;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case '\0':
|
||||||
// the value is in the next argument
|
// the value is in the next argument
|
||||||
if ( ++n == count )
|
if ( ++n == count )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user