another WIZKIT fix

if $HOME is not set, don't use uninitialized buffer as the filename to open
This commit is contained in:
cohrs
2002-01-23 18:06:19 +00:00
parent 0011db11d3
commit 4b677185de

View File

@@ -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 */