X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..8f79ece33306d91be746a694f3893906bba67465:/src/x11/app.cpp diff --git a/src/x11/app.cpp b/src/x11/app.cpp index d2b9c0b3bf..e9c7b2bb17 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -100,7 +100,7 @@ bool wxApp::Initialize(int& argC, wxChar **argV) { if (wxStrcmp( argV[i], wxT("-display") ) == 0) { - if (i < (argC - 1)) + if (i < (argCOrig - 1)) { argV[i++] = NULL; @@ -112,7 +112,7 @@ bool wxApp::Initialize(int& argC, wxChar **argV) } else if (wxStrcmp( argV[i], wxT("-geometry") ) == 0) { - if (i < (argC - 1)) + if (i < (argCOrig - 1)) { argV[i++] = NULL; @@ -149,12 +149,12 @@ bool wxApp::Initialize(int& argC, wxChar **argV) if ( argC != argCOrig ) { - // remove the argumens we consumed + // remove the arguments we consumed 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 *)); } } }