static analyzer bit for trap.c

src/trap.c(5794): warning: Dereferencing NULL pointer 'which'.
This commit is contained in:
nhmall
2023-12-27 11:13:22 -05:00
parent d51e92d4bd
commit 0927726900

View File

@@ -5791,6 +5791,7 @@ openholdingtrap(
if (!which)
which = t->tseen ? the_your[t->madeby_u]
: strchr(vowels, *trapdescr) ? "an" : "a";
assert(which != 0);
if (*which)
which = strcat(strcpy(whichbuf, which), " ");