summaryrefslogtreecommitdiff
path: root/games/adventure/wizard.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-18 06:38:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-18 06:38:44 +0000
commitc58e4ea9bf2e7005f2603c1eca2552d53b50ef9d (patch)
treeebd7603c2daf59636efcbd2412602dde6fb15112 /games/adventure/wizard.c
parent0f196969d3b8147be4e25712f1668cda8bdab7dd (diff)
someone should read compiler messages on the powerpc
Diffstat (limited to 'games/adventure/wizard.c')
-rw-r--r--games/adventure/wizard.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/games/adventure/wizard.c b/games/adventure/wizard.c
index 91b7cd6fcd5..c24a0e758ba 100644
--- a/games/adventure/wizard.c
+++ b/games/adventure/wizard.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wizard.c,v 1.8 2001/03/22 22:31:47 pjanzen Exp $ */
+/* $OpenBSD: wizard.c,v 1.9 2002/02/18 06:38:43 deraadt Exp $ */
/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93";
#else
-static char rcsid[] = "$OpenBSD: wizard.c,v 1.8 2001/03/22 22:31:47 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: wizard.c,v 1.9 2002/02/18 06:38:43 deraadt Exp $";
#endif
#endif /* not lint */
@@ -130,13 +130,16 @@ wizard() /* not as complex as advent/10 (for now) */
void
ciao()
{
+ int ch;
char *c;
char fname[MAXPATHLEN];
printf("What would you like to call the saved version?\n");
- for (c = fname; c - fname < MAXPATHLEN; c++)
- if ((*c = getchar()) == '\n' || *c == EOF)
+ for (c = fname; c - fname < MAXPATHLEN; c++) {
+ *c = ch = getchar();
+ if ((*c = getchar()) == '\n' || ch == EOF)
break;
+ }
if (c - fname == MAXPATHLEN) {
c--;
FLUSHLINE;