From 82f73a2008ef7df7191b3517038126d801e80026 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 26 Apr 2007 02:13:17 +0000 Subject: [PATCH] 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.) --- src/objnam.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/objnam.c b/src/objnam.c index d642a08a4..126387f05 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -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