diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 031ede3802..c92ce91869 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -238,11 +238,10 @@ static void HandleCommandLine(LPWSTR cmdline) /* skip executable name */ delimiter = (*cmdline == '"' ? '"' : ' '); - do - { - cmdline++; - } - while (*cmdline && *cmdline != delimiter); + if (*cmdline == delimiter) cmdline++; + + while (*cmdline && *cmdline != delimiter) cmdline++; + if (*cmdline == delimiter) cmdline++; while (*cmdline == ' ' || *cmdline == '-' || *cmdline == '/')