]> granicus.if.org Git - nethack/commitdiff
another WIZKIT fix
authorcohrs <cohrs>
Wed, 23 Jan 2002 18:23:54 +0000 (18:23 +0000)
committercohrs <cohrs>
Wed, 23 Jan 2002 18:23:54 +0000 (18:23 +0000)
previous rev put the new "else" in the wrong place

src/files.c

index c0aecd561ef9a798220dd18e8c91a525c82a5262..9bfd507d5193e688959385aeeaa7d7db8e3339ae 100644 (file)
@@ -1640,9 +1640,9 @@ fopen_wizkit_file()
        envp = nh_getenv("HOME");
        if (envp)
                Sprintf(tmp_wizkit, "%s/%s", envp, wizkit);
+       else    Strcpy(tmp_wizkit, 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 */