winedbg: Fix command line arguments parsing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42030 Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1fb4ce83f4
commit
9808c1d8a3
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue