fix segfault in certain situations do to missing arguments
This commit is contained in:
parent
6e5d8a1e6a
commit
202142a8af
1 changed files with 1 additions and 1 deletions
2
XD.c
2
XD.c
|
|
@ -222,7 +222,7 @@ main(int argc, char *argv[])
|
|||
int code = -1;
|
||||
|
||||
/* print version information */
|
||||
if (strcmp(argv[1], "-v") == 0) {
|
||||
if (argc > 1 && strcmp(argv[1], "-v") == 0) {
|
||||
printf("XD [number] v%s\n", VERSION);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue