From bd2109d614a443045c7bbbf632bb9035216e3623 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 19 May 2015 01:59:33 +0200 Subject: Fixed some issues reported by coverity scan [3/3] - Automatically zeroed variables are now zeroed in the correct size, regardless of padding. - Special thanks to Ind. Signed-off-by: Haru --- src/map/status.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map/status.h') diff --git a/src/map/status.h b/src/map/status.h index 3b85c4014..b370a9c88 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1980,7 +1980,8 @@ struct status_interface { /* vars */ int current_equip_item_index; int current_equip_card_id; - /* */ + +BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */ int max_weight_base[CLASS_COUNT]; int HP_table[CLASS_COUNT][MAX_LEVEL + 1]; int SP_table[CLASS_COUNT][MAX_LEVEL + 1]; @@ -1997,6 +1998,8 @@ struct status_interface { int atkmods[3][MAX_WEAPON_TYPE];//ATK weapon modification for size (size_fix.txt) char job_bonus[CLASS_COUNT][MAX_LEVEL]; sc_conf_type sc_conf[SC_MAX]; +END_ZEROED_BLOCK; /* End */ + struct eri *data_ers; //For sc_data entries struct status_data dummy; int64 natural_heal_prev_tick; -- cgit v1.2.3-60-g2f50