From a43a3ac9887df7b9cd03e96f3a003848a0deb5f0 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 23 Dec 2005 02:51:06 +0000 Subject: [PATCH] fix #H4 - remote recognition of Astral Plane high priests From a bug report: the Call command's prompt is careful not to include "of " when asking what name to give a high priest on the Astral level, but the resulting rejection message of "the doesn't like to be called names" did not, resulting in feedback of "the high priest of " and giving away which temple it is from afar. --- doc/fixes34.4 | 1 + src/do_name.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index c015e96d7..69031f814 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/do_name.c b/src/do_name.c index af325879f..b1354f875 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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); -- 2.50.1