Commit 9808c1d8 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedbg: Fix command line arguments parsing.

parent 1fb4ce83
......@@ -676,7 +676,7 @@ int main(int argc, char** argv)
/* parse options */
while (argc > 0 && argv[0][0] == '-')
{
if (!strcmp(argv[0], "--command"))
if (!strcmp(argv[0], "--command") && argc > 1)
{
argc--; argv++;
hFile = parser_generate_command_file(argv[0], NULL);
......@@ -688,7 +688,7 @@ int main(int argc, char** argv)
argc--; argv++;
continue;
}
if (!strcmp(argv[0], "--file"))
if (!strcmp(argv[0], "--file") && argc > 1)
{
argc--; argv++;
hFile = CreateFileA(argv[0], GENERIC_READ|DELETE, 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment