diff --git a/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp b/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp index f33a9158262..b93c1d905ae 100644 --- a/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp +++ b/mozilla/toolkit/xre/nsNativeAppSupportWin.cpp @@ -422,6 +422,15 @@ nsNativeAppSupportWin::CheckConsole() { // Failed. Probably because there already is one. // There's little we can do, in any case. } + + // Remove the console argument from the command line. + do { + gArgv[i] = gArgv[i + 1]; + ++i; + } while (gArgv[i]); + + --gArgc; + // Don't bother doing this more than once. break; }