summaryrefslogtreecommitdiffstats
path: root/games/trek
diff options
context:
space:
mode:
authorpvalchev <pvalchev@openbsd.org>2002-02-25 00:15:19 +0000
committerpvalchev <pvalchev@openbsd.org>2002-02-25 00:15:19 +0000
commit8632d7e4b06d20b14881414921e95e9d3fcc2682 (patch)
tree20c02e9ccea8c3aa0d3bf28c471f1b53e8015ba0 /games/trek
parentgetchar returns an int (diff)
downloadwireguard-openbsd-8632d7e4b06d20b14881414921e95e9d3fcc2682.tar.xz
wireguard-openbsd-8632d7e4b06d20b14881414921e95e9d3fcc2682.zip
handle EOF gracefully; ok pjanzen
Diffstat (limited to 'games/trek')
-rw-r--r--games/trek/getpar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/trek/getpar.c b/games/trek/getpar.c
index 853cb0483ca..991b7ce415c 100644
--- a/games/trek/getpar.c
+++ b/games/trek/getpar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getpar.c,v 1.6 2002/02/24 09:07:46 pvalchev Exp $ */
+/* $OpenBSD: getpar.c,v 1.7 2002/02/25 00:15:19 pvalchev Exp $ */
/* $NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getpar.c,v 1.6 2002/02/24 09:07:46 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: getpar.c,v 1.7 2002/02/25 00:15:19 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -246,7 +246,7 @@ testnl()
while ((c = getchar()) != '\n')
if ((c >= '0' && c <= '9') || c == '.' || c == '!' ||
(c >= 'A' && c <= 'Z') ||
- (c >= 'a' && c <= 'z') || c == '-')
+ (c >= 'a' && c <= 'z') || c == '-' || c == EOF)
{
ungetc(c, stdin);
return(0);