diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp index f1ca718d53e9..fcb260b3a597 100644 --- a/browser/app/nsBrowserApp.cpp +++ b/browser/app/nsBrowserApp.cpp @@ -312,7 +312,8 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory) } ptr++; } - newArgc--; + if (ptr == newArgv[newArgc-1]) + newArgc--; int result = XRE_main(newArgc, newArgv, appData, mainFlags); XRE_FreeAppData(appData); return result;