]> granicus.if.org Git - nethack/commitdiff
further refine k-sound pluralization
authornhmall <nhmall@nethack.org>
Mon, 18 Nov 2019 18:23:13 +0000 (13:23 -0500)
committernhmall <nhmall@nethack.org>
Mon, 18 Nov 2019 18:23:13 +0000 (13:23 -0500)
src/objnam.c

index 796c90e844a8b4a77c237f5d37600b17d405b4eb..9bc9148b42f8bb4ff0f816549f1d8a14a88faf67 100644 (file)
@@ -2451,8 +2451,11 @@ const char *oldstr;
     if (index("zxs", lo_c)
         || (len >= 2 && lo_c == 'h' && index("cs", lowc(*(spot - 1)))
             /* 21st century k-sound */
-            && !(len >= 4 && !strcmpi(spot - 2, "ech")
-                && index("tm", lowc(*(spot - 4)))))
+            && !(len >= 4 &&
+                 ((lowc(*(spot - 2)) == 'e'
+                    && index("mt", lowc(*(spot - 3)))) ||
+                  (lowc(*(spot - 2)) == 'o'
+                    && index("lp", lowc(*(spot - 3)))))))
         /* Kludge to get "tomatoes" and "potatoes" right */
         || (len >= 4 && !strcmpi(spot - 2, "ato"))
         || (len >= 5 && !strcmpi(spot - 4, "dingo"))) {