]> granicus.if.org Git - nethack/commitdiff
another WIZKIT fix
authorcohrs <cohrs>
Wed, 23 Jan 2002 18:06:19 +0000 (18:06 +0000)
committercohrs <cohrs>
Wed, 23 Jan 2002 18:06:19 +0000 (18:06 +0000)
if $HOME is not set, don't use uninitialized buffer as the filename to open

src/files.c

index 3c09b30b869f47ad0088b9e8220d32a6198f007b..c0aecd561ef9a798220dd18e8c91a525c82a5262 100644 (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 */