diff options
author | 2001-01-01 22:33:01 +0000 | |
---|---|---|
committer | 2001-01-01 22:33:01 +0000 | |
commit | e1e1f91dbfc7209999051d2be1f2b5d534e14348 (patch) | |
tree | eed615a656a775e57950b33288772b6d28c8eb0e /sail/main.c | |
parent | e7ed7efe5f58d48728b45e4fd86814f91a069946 (diff) | |
download | bsdgames-darwin-e1e1f91dbfc7209999051d2be1f2b5d534e14348.tar.gz bsdgames-darwin-e1e1f91dbfc7209999051d2be1f2b5d534e14348.tar.zst bsdgames-darwin-e1e1f91dbfc7209999051d2be1f2b5d534e14348.zip |
Fix getopt usage (again) in case where user does not choose a scenario on
the command line.
Diffstat (limited to 'sail/main.c')
-rw-r--r-- | sail/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sail/main.c b/sail/main.c index 587a0228..db2d36f6 100644 --- a/sail/main.c +++ b/sail/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.15 2001/01/01 22:05:04 jwise Exp $ */ +/* $NetBSD: main.c,v 1.16 2001/01/01 22:33:01 jwise Exp $ */ /* * Copyright (c) 1983, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: main.c,v 1.15 2001/01/01 22:05:04 jwise Exp $"); +__RCSID("$NetBSD: main.c,v 1.16 2001/01/01 22:33:01 jwise Exp $"); #endif #endif /* not lint */ @@ -108,6 +108,9 @@ main(int argc, char **argv) exit(1); } + argc -= optind; + argv += optind; + if (*argv) game = atoi(*argv); else |