summaryrefslogtreecommitdiff
path: root/games/adventure/wizard.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/adventure/wizard.c')
-rw-r--r--games/adventure/wizard.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/games/adventure/wizard.c b/games/adventure/wizard.c
index 55690443991..5255115834e 100644
--- a/games/adventure/wizard.c
+++ b/games/adventure/wizard.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wizard.c,v 1.15 2013/08/22 04:43:41 guenther Exp $ */
+/* $OpenBSD: wizard.c,v 1.16 2014/11/16 04:49:48 guenther Exp $ */
/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
@@ -37,7 +37,7 @@
/* Re-coding of advent in C: privileged operations */
-#include <sys/param.h>
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -117,15 +117,15 @@ ciao(void)
{
int ch;
char *c;
- char fname[MAXPATHLEN];
+ char fname[PATH_MAX];
printf("What would you like to call the saved version?\n");
- for (c = fname; c - fname < MAXPATHLEN; c++) {
+ for (c = fname; c - fname < sizeof(fname); c++) {
if ((ch = getchar()) == '\n' || ch == EOF)
break;
*c = ch;
}
- if (c - fname == MAXPATHLEN) {
+ if (c - fname == sizeof(fname)) {
c--;
FLUSHLINE;
}