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>
(cherry picked from commit 9808c1d8a3
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
ad7c5e9ced
commit
b00bd9b9ee
|
@ -717,7 +717,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);
|
||||
|
@ -729,7 +729,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