From b5ac9f1dfbf1ef131a8bb0a37ef750f3bb3450df Mon Sep 17 00:00:00 2001 From: Thomas Arp Date: Sun, 27 Nov 2016 21:53:44 +0100 Subject: [PATCH] Fix of potential array-index-out-of-bounds when vict->in_room is NOWHERE. See http://www.tbamud.com/forum/4-development/4148-skill-stun-wierd-problem#6321 --- src/dg_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dg_misc.c b/src/dg_misc.c index f059d08..05d3c75 100644 --- a/src/dg_misc.c +++ b/src/dg_misc.c @@ -305,7 +305,7 @@ void script_damage(struct char_data *vict, int dam) if (GET_POS(vict) == POS_DEAD) { if (!IS_NPC(vict)) mudlog( BRF, 0, TRUE, "%s killed by script at %s", - GET_NAME(vict), world[vict->in_room].name); + GET_NAME(vict), vict->in_room == NOWHERE ? "NOWHERE" : world[vict->in_room].name); die(vict, NULL); } }