diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 65d8a83c6..7558e4648 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -17,6 +17,8 @@ any existing vampire shape-shifted into critter (fog cloud, bat, wolf) became an unkillable critter if vampires were genocided unlike in previous versions, an uncursed scroll of enchant armor failed to uncurse the piece of armor being enchanted (change was unintentional) +slice of {pizza,cake,&} pluralized as "slouse of ..." due to false match + with "lice" (discovered pre-3.6.0-release) Platform- and/or Interface-Specific Fixes diff --git a/src/objnam.c b/src/objnam.c index bf68842e7..7e3f6aea1 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1449740045 2015/12/10 09:34:05 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.155 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1449975408 2015/12/13 02:56:48 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.156 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1874,6 +1874,15 @@ const char *const *alt_as_is; /* another set like as_is[] */ } } + /* avoid false hit on one_off[].plur == "lice"; + if more of these turn up, one_off[] entries will need to flagged + as to which are whole words and which are matchable as suffices + then matching in the loop below will end up becoming more complex */ + if (!strcmpi(basestr, "slice")) { + if (to_plural) + (void) strkitten(basestr, 's'); + return TRUE; + } for (sp = one_off; sp->sing; sp++) { /* check whether endstring already matches */ same = to_plural ? sp->plur : sp->sing;