]> granicus.if.org Git - nethack/commitdiff
fix #H4 - remote recognition of Astral Plane high priests
authornethack.rankin <nethack.rankin>
Fri, 23 Dec 2005 02:51:06 +0000 (02:51 +0000)
committernethack.rankin <nethack.rankin>
Fri, 23 Dec 2005 02:51:06 +0000 (02:51 +0000)
     From a bug report:  the Call command's
prompt is careful not to include "of <deity>" when asking what name to give
a high priest on the Astral level, but the resulting rejection message of
"the <unique monster> doesn't like to be called names" did not, resulting
in feedback of "the high priest of <deity>" and giving away which temple it
is from afar.

doc/fixes34.4
src/do_name.c

index c015e96d7cca3ee4e511f1c13eebd9b0bb985d54..69031f814b379edbac4970b14d0ed0050df9f49a 100644 (file)
@@ -170,6 +170,7 @@ can hear the opening or closing of an unseen drawbridge
 prevent "object lost" panic caused by accessing freed memory after worn
        non-fireproof water walking boots are destroyed by lava
 stop multi-turn running, searching, or resting early if levitation ends
+Call command could be used to remotely identify which high priest is which
 
 
 Platform- and/or Interface-Specific Fixes
index af325879fa011d55746c2c06f5a77e217ef1244c..b1354f875f4802c5713c2e9a499339a4941a16e4 100644 (file)
@@ -246,7 +246,7 @@ const char *name;
 int
 do_mname()
 {
-       char buf[BUFSZ];
+       char buf[BUFSZ], monnambuf[BUFSZ];
        coord cc;
        register int cx,cy;
        register struct monst *mtmp;
@@ -290,15 +290,15 @@ do_mname()
                return(0);
        }
        /* special case similar to the one in lookat() */
-       (void) distant_monnam(mtmp, ARTICLE_THE, buf);
-       Sprintf(qbuf, "What do you want to call %s?", buf);
+       (void) distant_monnam(mtmp, ARTICLE_THE, monnambuf);
+       Sprintf(qbuf, "What do you want to call %s?", monnambuf);
        getlin(qbuf,buf);
        if(!*buf || *buf == '\033') return(0);
        /* strip leading and trailing spaces; unnames monster if all spaces */
        (void)mungspaces(buf);
 
        if (mtmp->data->geno & G_UNIQ)
-           pline("%s doesn't like being called names!", Monnam(mtmp));
+           pline("%s doesn't like being called names!", upstart(monnambuf));
        else
            (void) christen_monst(mtmp, buf);
        return(0);