From fc43d1cacbb62fd854960901688e1b9b9752e7cd Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 21 Aug 2011 17:58:28 +0100 Subject: Fix usage printing --- getgbook.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/getgbook.c b/getgbook.c index 3fbdf47..8073194 100644 --- a/getgbook.c +++ b/getgbook.c @@ -107,7 +107,9 @@ int main(int argc, char *argv[]) int a, i, j, totalpages; FILE *f; - if(argc < 2 || argc > 3 || (argc == 3 && argv[1][0]!='-')) { + if(argc < 2 || argc > 3 || (argc == 3 && (argv[1][0]!='-' + || (argv[1][1] != 'c' && argv[1][1] != 'n'))) + || (argc >= 2 && argv[1][0] == '-' && argv[1][1] == 'h')) { fputs(usage, stdout); return 1; } -- cgit v1.2.3