]> granicus.if.org Git - nethack/commitdiff
reinstate bit - gak!
authornhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 15:15:55 +0000 (10:15 -0500)
committernhmall <nhmall@nethack.org>
Sat, 16 Nov 2019 15:15:55 +0000 (10:15 -0500)
src/objnam.c

index ba301b9cf8185a8d95525341f7150290d38a7bb2..9cf7edda010f22d5ad1769f8696ac49cfd7a1961 100644 (file)
@@ -2205,7 +2205,11 @@ const char *const *alt_as_is; /* another set like as_is[] */
         }
     }
 
-    /* avoid false hit on one_off[].plur == "lice" or .sing == "goose";
+   /* Leave "craft" as a suffix as-is (aircraft, hovercraft);
+      "craft" itself is (arguably) not included in our likely context */
+   if ((baselen > 5) && (!BSTRCMPI(basestr, endstring - 5, "craft")))
+       return TRUE;
+   /* avoid false hit on one_off[].plur == "lice" or .sing == "goose";
        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 */