From: cohrs Date: Wed, 23 Jan 2002 18:06:19 +0000 (+0000) Subject: another WIZKIT fix X-Git-Tag: MOVE2GIT~3370 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b677185de5f762874d8cba3c8153c5841ec7546;p=nethack another WIZKIT fix if $HOME is not set, don't use uninitialized buffer as the filename to open --- diff --git a/src/files.c b/src/files.c index 3c09b30b8..c0aecd561 100644 --- a/src/files.c +++ b/src/files.c @@ -1642,6 +1642,7 @@ fopen_wizkit_file() Sprintf(tmp_wizkit, "%s/%s", envp, wizkit); if ((fp = fopenp(tmp_wizkit, "r")) != (FILE *)0) return(fp); + else Strcpy(tmp_wizkit, wizkit); else if (errno != ENOENT) { /* e.g., problems when setuid NetHack can't search home * directory restricted to user */