From 9b974fa6f1980e267a542c66f0404c67f2ef7b8b Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sat, 11 Jan 1997 10:01:30 +0000 Subject: Fix PR#2 in a simplistic way. Handle EOF on all getchar()s --- games/adventure/wizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'games/adventure/wizard.c') diff --git a/games/adventure/wizard.c b/games/adventure/wizard.c index 2ff3f5f798b..4722391ebe8 100644 --- a/games/adventure/wizard.c +++ b/games/adventure/wizard.c @@ -120,7 +120,7 @@ char *cmdfile; printf("What would you like to call the saved version?\n"); for (c=fname;; c++) - if ((*c=getchar())=='\n') break; + if ((*c=getchar())=='\n' || *c == EOF) break; *c=0; if (save(fname) != 0) return; /* Save failed */ printf("To resume, say \"adventure %s\".\n", fname); -- cgit v1.2.3