The original number of arguments should be used when checking the argument
index for validity. Additionally, memmove() wasn't moving the correct number
of bytes because of forgotten sizeof().
See #11124.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61714
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
if (wxStrcmp( argV[i], wxT("-display") ) == 0)
{
{
if (wxStrcmp( argV[i], wxT("-display") ) == 0)
{
+ if (i < (argCOrig - 1))
}
else if (wxStrcmp( argV[i], wxT("-geometry") ) == 0)
{
}
else if (wxStrcmp( argV[i], wxT("-geometry") ) == 0)
{
+ if (i < (argCOrig - 1))
if ( argC != argCOrig )
{
if ( argC != argCOrig )
{
- // remove the argumens we consumed
+ // remove the arguments we consumed
for ( int i = 0; i < argC; i++ )
{
while ( !argV[i] )
{
for ( int i = 0; i < argC; i++ )
{
while ( !argV[i] )
{
- memmove(argV + i, argV + i + 1, argCOrig - i);
+ memmove(argV + i, argV + i + 1, (argCOrig - i)*sizeof(wxChar *));