From 5cc368a1778ee8e564d6ce066d69cd84226b60e3 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 29 Nov 2018 18:54:59 -0500 Subject: [PATCH] Corrected a potential overflow in item bonuses (#3709) * Fixes #3703. * Fixed bHealPower, bHealPower2, bSPGainValue, bHPGainValue, bMagicSPGainValue, and bMagicHPGainValue having a chance to potentially overflow from signed short limit. Thanks to @Everade! --- src/map/pc.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/pc.hpp b/src/map/pc.hpp index e51d999d71..3308b9fd2f 100644 --- a/src/map/pc.hpp +++ b/src/map/pc.hpp @@ -472,8 +472,8 @@ struct map_session_data { short splash_range, splash_add_range; short add_steal_rate; - short add_heal_rate, add_heal2_rate; - short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value; + int add_heal_rate, add_heal2_rate; + int sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value; short sp_vanish_rate, hp_vanish_rate; short sp_vanish_per, hp_vanish_per; unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]