diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index d2156058d..1b9d5a94b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3229,6 +3229,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list * Pierce defence gains 1 atk per def/2 **/ + if( def1 == -400 ) /* being hit by a gazillion units, you hit the jackpot and got -400 which creates a division by 0 and subsequently crashes */ + def1 = -399; + ATK_ADD2( flag.pdef ?(def1/2):0, flag.pdef2?(def1/2):0 |