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
This commit is contained in:
@@ -305,7 +305,7 @@ void script_damage(struct char_data *vict, int dam)
|
|||||||
if (GET_POS(vict) == POS_DEAD) {
|
if (GET_POS(vict) == POS_DEAD) {
|
||||||
if (!IS_NPC(vict))
|
if (!IS_NPC(vict))
|
||||||
mudlog( BRF, 0, TRUE, "%s killed by script at %s",
|
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);
|
die(vict, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user