summaryrefslogtreecommitdiffstats
path: root/XD.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--XD.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/XD.c b/XD.c
index 122fbce..362fe79 100644
--- a/XD.c
+++ b/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;
}