1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

fixup argv handling after getopt conversion. oops.

This commit is contained in:
tedu 2014-11-06 19:54:10 +00:00
parent e17bcdb243
commit 09d6f9ae6b

View File

@ -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))