diff --git a/windows/pageant.c b/windows/pageant.c index fd266b0b..c91d80c6 100644 --- a/windows/pageant.c +++ b/windows/pageant.c @@ -1508,8 +1508,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * If we see `-c', then the rest of the command line * should be treated as a command to be spawned. */ - if (amo.index < amo.argc-1) - command = argstart[amo.index + 1]; + if (amo.index < amo.argc) + command = argstart[amo.index]; else command = ""; break;