summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-11-06 19:54:10 +0000
committertedu <tedu@openbsd.org>2014-11-06 19:54:10 +0000
commit09d6f9ae6bf681f01ad786f4c21156c895b5ef1d (patch)
tree7ba10d5c21cb54231d28c3545e8e9f9c2ec0a78f
parent-l option to create "modern" 80 column cards (diff)
downloadwireguard-openbsd-09d6f9ae6bf681f01ad786f4c21156c895b5ef1d.tar.xz
wireguard-openbsd-09d6f9ae6bf681f01ad786f4c21156c895b5ef1d.zip
fixup argv handling after getopt conversion. oops.
-rw-r--r--games/bcd/bcd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/games/bcd/bcd.c b/games/bcd/bcd.c
index 59770925054..42aba7832bf 100644
--- a/games/bcd/bcd.c
+++ b/games/bcd/bcd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcd.c,v 1.18 2014/11/06 19:42:06 tedu Exp $ */
+/* $OpenBSD: bcd.c,v 1.19 2014/11/06 19:54:10 tedu Exp $ */
/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
@@ -152,10 +152,10 @@ main(int argc, char *argv[])
* The original bcd prompts with a "%" when reading from stdin,
* but this seems kind of silly. So this one doesn't.
*/
- if (argc > 1) {
- while (--argc) {
- argv++;
+ if (argc > 0) {
+ while (argc--) {
printcard(*argv);
+ argv++;
}
} else {
while (fgets(cardline, sizeof(cardline), stdin))