From: Ray Chason Date: Thu, 3 Nov 2022 23:58:56 +0000 (-0400) Subject: Fix inadvertent change of strchr to index X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14b8350bcedec903bd172cdf2344b092df564b5c;p=nethack Fix inadvertent change of strchr to index Thanks to entrez for pointing this out. --- diff --git a/src/mkobj.c b/src/mkobj.c index 8f3893c89..01a8a3419 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -761,7 +761,7 @@ static const char dknowns[] = { WAND_CLASS, RING_CLASS, POTION_CLASS, void clear_dknown(struct obj *obj) { - obj->dknown = index(dknowns, obj->oclass) ? 0 : 1; + obj->dknown = strchr(dknowns, obj->oclass) ? 0 : 1; if ((obj->otyp >= ELVEN_SHIELD && obj->otyp <= ORCISH_SHIELD) || obj->otyp == SHIELD_OF_REFLECTION || objects[obj->otyp].oc_merge)