From 2b127ee4533e0607a15c7c82b74580fda5865ddc Mon Sep 17 00:00:00 2001 From: copperwater Date: Sun, 9 Dec 2018 09:51:47 -0500 Subject: [PATCH] Fix resurfacing of "foxen" pluralization bug Inadvertently reintroduced in f9f1236. It was just the conditional that was bad: due to resolving the possible buffer underflow when comparing to "muskox", the pluralizer now only adds -es when the length of the string is greater than 5. So for "box" and "fox" the pluralizer will never add the -es ending, since they are greater than 5. This commit checks for "does not end in muskox" correctly. --- src/objnam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objnam.c b/src/objnam.c index 7ed8f33fb..05aade695 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -2115,7 +2115,7 @@ const char *const *alt_as_is; /* another set like as_is[] */ /* skip "ox" -> "oxen" entry when pluralizing "ox" unless it is muskox */ if (to_plural && baselen > 2 && !strcmpi(endstring - 2, "ox") - && baselen > 5 && strcmpi(endstring - 6, "muskox")) { + && !(baselen > 5 && !strcmpi(endstring - 6, "muskox"))) { /* "fox" -> "foxes" */ Strcasecpy(endstring, "es"); return TRUE;