From 38f9ba9a9196a5d9a45f930c695258dbc7c7da83 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Mon, 20 Dec 2004 23:57:02 +0000 Subject: [PATCH] candelabrum wording On Sat, 18 Dec 2004 14:07:14 +1300, wrote: > Adding one of several candles to a candelabrum which already has six > gives an ungrammatical message. --- doc/fixes34.4 | 2 ++ src/apply.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 14de95848..dacc71c5a 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -76,6 +76,8 @@ monsters "shrieking in pain" from a potion didn't wake anything up Master of Thieves as Tourist Nemesis still had STRAT_CLOSE co-aligned unicorns in bones could be hostile finding "something" posing as a statue while Blind should map_invisible() +adding more candles than required to total 7 to a candelabrum which + already had between 1 and 6 gave an ungrammatical message Platform- and/or Interface-Specific Fixes diff --git a/src/apply.c b/src/apply.c index 45df4545d..75c7e1f56 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1026,9 +1026,12 @@ struct obj **optr; use_lamp(obj); return; } else { - if ((long)otmp->spe + obj->quan > 7L) + if ((long)otmp->spe + obj->quan > 7L) { obj = splitobj(obj, 7L - (long)otmp->spe); - else *optr = 0; + /* avoid a gramatical error if obj->quan gets + reduced to 1 candle from more than one */ + s = (obj->quan != 1) ? "candles" : "candle"; + } else *optr = 0; You("attach %ld%s %s to %s.", obj->quan, !otmp->spe ? "" : " more", s, the(xname(otmp))); -- 2.40.0