From fc75a55d863b23f80ae8881303e5afe80d13a29c Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 9 Sep 2026 21:15:43 -0400 Subject: [PATCH] fix "killed by a died" This is a follow-up to commit 9114a33 that was intended to fix a "killed by a died" situation. In that commit, the generic case could be encountered with variable str set to "explosion", but that never got copied to svk.killer.name, and svk.killer.name remained set to "died" during testing. svk.killer.format = KILLED_BY_AN; is done whether the generic case, or not. Close #1676 --- src/explode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/explode.c b/src/explode.c index e2e5fa90b..0a8eec530 100644 --- a/src/explode.c +++ b/src/explode.c @@ -643,10 +643,14 @@ explode( rehumanize(); } else { if (olet == MON_EXPLODE) { - if (generic) /* explosion was unseen; str=="explosion", */ - ; /* svk.killer.name=="gas spore's explosion". */ - else if (str != svk.killer.name && str != hallu_buf) + if (generic) { + /* explosion was unseen; str=="explosion", */ + /* svk.killer.name=="gas spore's explosion" */ + if (!strcmp(str, "explosion")) + Strcpy(svk.killer.name, str); + } else if (str != svk.killer.name && str != hallu_buf) { Strcpy(svk.killer.name, str); + } svk.killer.format = KILLED_BY_AN; } else if (olet == TRAP_EXPLODE) { svk.killer.format = NO_KILLER_PREFIX;