follow-up invent.c

This commit is contained in:
nhmall
2023-12-24 00:23:15 -05:00
parent 2e35f04c1d
commit 547adae5f9

View File

@@ -4880,7 +4880,7 @@ mergable(
if ((objnamelth != otmpnamelth
&& ((objnamelth && otmpnamelth) || obj->otyp == CORPSE))
|| (objnamelth && otmpnamelth
/* safe_oname could have returned ptr to "", verify before deref */
/* verify pointers before deref for static analyzer */
&& has_oname(obj) && has_oname(otmp)
&& strncmp(ONAME(obj), ONAME(otmp), objnamelth)))
return FALSE;