corpse_xname tweak (trunk only)

Noticed while testing a patch for touching cockatrice corpses;
corpse_xname(,, CXN_ARTICLE) would produce "a cockatrice corpses" when the
object stack quantity was greater than 1.  (This applies to the post-3.4.3
expansion of corpse_xname() in the trunk code, so no fixes entry.)
This commit is contained in:
nethack.rankin
2007-04-26 02:13:17 +00:00
parent 4f380c3128
commit 82f73a2008

View File

@@ -999,7 +999,10 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
if (!omit_corpse) {
Strcat(nambuf, " corpse");
/* makeplural(nambuf) => append "s" to "corpse" */
if (otmp->quan > 1L && !ignore_quan) Strcat(nambuf, "s");
if (otmp->quan > 1L && !ignore_quan) {
Strcat(nambuf, "s");
any_prefix = FALSE; /* avoid "a newt corpses" */
}
}
/* it's safe to overwrite our nambuf after an() has copied