diff options
-rw-r--r-- | games/adventure/io.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/games/adventure/io.c b/games/adventure/io.c index c397d682506..a492b263d9d 100644 --- a/games/adventure/io.c +++ b/games/adventure/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.8 2001/02/17 20:14:57 pjanzen Exp $ */ +/* $OpenBSD: io.c,v 1.9 2001/03/22 22:32:39 pjanzen Exp $ */ /* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */ /*- @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.8 2001/02/17 20:14:57 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.9 2001/03/22 22:32:39 pjanzen Exp $"; #endif #endif /* not lint */ @@ -143,7 +143,8 @@ yes(x, y, z) /* confirm with rspeak */ printf("user closed input stream, quitting...\n"); exit(0); } - FLUSHLINE; + if (ch != '\n') + FLUSHLINE; if (ch == 'y' || ch == 'n') break; printf("Please answer the question.\n"); @@ -166,13 +167,14 @@ yesm(x, y, z) /* confirm with mspeak */ mspeak(x); /* tell him what we want */ if ((ch = getchar()) == 'y') result = TRUE; - else if (ch=='n') + else if (ch == 'n') result = FALSE; else if (ch == EOF) { printf("user closed input stream, quitting...\n"); exit(0); } - FLUSHLINE; + if (ch != '\n') + FLUSHLINE; if (ch == 'y' || ch == 'n') break; printf("Please answer the question.\n"); |