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:
parent
15ee2c8846
commit
44d6132b97
1 changed files with 4 additions and 0 deletions
|
@ -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" :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue