1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-08-04 03:44:04 +01:00

Check if the attack key is out of bounds

This commit is contained in:
ChrisANG 2021-02-03 22:00:42 -05:00
parent 15ee2c8846
commit 44d6132b97

View file

@ -3494,6 +3494,10 @@ printAttacks(buf, ptr)
attk->damn == 0 &&
attk->damd == 0
) return;
if(SIZE(attackKey) <= attk->adtyp)
impossible("attack key out of range!");
if(SIZE(damageKey) <= attk->adtyp)
impossible("damage key out of range!");
if(!i){
Sprintf(buf, "%s %dd%d %s",
attk->aatyp == AT_WEAP ? "Weapon" :