diff options
author | shennetsind <notind@gmail.com> | 2013-06-20 04:16:57 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-06-20 04:16:57 -0700 |
commit | df956fefed1d82af4025d255f29d71b9db221f96 (patch) | |
tree | 57df9e90f12f5ab81bb2db001858f9896d34d14d | |
parent | 594e30964ea4421654fd636e35b046aabd4df9ac (diff) | |
parent | 99cd190d67a35b1d8ea976247cdbd3ebdfb1155c (diff) | |
download | hercules-df956fefed1d82af4025d255f29d71b9db221f96.tar.gz hercules-df956fefed1d82af4025d255f29d71b9db221f96.tar.bz2 hercules-df956fefed1d82af4025d255f29d71b9db221f96.tar.xz hercules-df956fefed1d82af4025d255f29d71b9db221f96.zip |
Merge pull request #45 from MishimaHaruna/master
Fixed an unsafe TBL_PC* cast in battle_calc_elefix
-rw-r--r-- | src/map/battle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ace947aca..800d573a2 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -820,7 +820,7 @@ int battle_calc_elefix(struct block_list *src, struct block_list *target, uint16 { // Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex] damage = #ifndef RENEWAL - battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, ((TBL_PC*)src), (flag?2:0)) + battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) #else battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_R, (flag?2:0)|(sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0), 0) #endif @@ -830,7 +830,7 @@ int battle_calc_elefix(struct block_list *src, struct block_list *target, uint16 if( left ){ damage = #ifndef RENEWAL - battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, ((TBL_PC*)src), (flag?2:0)) + battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) #else battle->calc_base_damage(src, target, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, EQI_HAND_L, (flag?2:0)|(sc && sc->data[SC_MAXIMIZEPOWER]?1:0)|(sc && sc->data[SC_WEAPONPERFECT]?8:0), 0) #endif |