Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4011
In
r8107 we gained this snippet of code:
CODE
md.damage = 7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_));
+ if (md.damage < 0 || md.damage > INT_MAX>>1)
+ //Overflow prevention, will anyone whine if I cap it to a few billion?
+ //Not capped to INT_MAX to give some room for further damage increase.
+ md.damage = INT_MAX>>1;
I got a report that if md.damage somehow gets below 0, the equation will turn it into 1 billion. Not healthy. I guess the patch assumed the values will stay unsigned. Once that stops being true (there are hints that it's possible to get negative stats even today?), this will need to be corrected.