fix access violation when --debug:xxxx has no other args after it
This commit is contained in:
+1
-1
@@ -343,7 +343,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||||
* says -d directory, hope nobody's using -desomething_else
|
* says -d directory, hope nobody's using -desomething_else
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -119,7 +119,7 @@ char *argv[];
|
|||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||||
* says -d directory, hope nobody's using -desomething_else
|
* says -d directory, hope nobody's using -desomething_else
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user