mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
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:
parent
d6ef378e4f
commit
b5ac9f1dfb
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue