summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/unit.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 281d60e7b..69f2d4ca4 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -2,6 +2,7 @@ Date Added
2010/11/24
* Fixed pets with player sprites causing the client to crash while looking for non-existing resources (topic:260895, follow up to r14488). [Ai4rei]
+ * Fixed calls to pc_delautobonus assuming map_session_data::autobonus2 and map_session_data::autobonus3 arrays having the same size as map_session_data::autobonus (since r13915). [Ai4rei]
2010/11/23
* Added script command pushpc, which is required by newer scripts. [Ai4rei]
- Moved knockback-part of skill_blown into unit_blown, to allow unconditional knockback required by pushpc without copy-pasting code.
diff --git a/src/map/status.c b/src/map/status.c
index 95d7f3796..97ca2ce82 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1859,8 +1859,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
// Autobonus
pc_delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),true);
- pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus),true);
- pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus),true);
+ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus2),true);
+ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),true);
// Parse equipment.
for(i=0;i<EQI_MAX-1;i++) {
diff --git a/src/map/unit.c b/src/map/unit.c
index 05c0bcb16..65267ea7f 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -2053,8 +2053,8 @@ int unit_free(struct block_list *bl, int clrtype)
pc_delinvincibletimer(sd);
pc_delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),false);
- pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus),false);
- pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus),false);
+ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus2),false);
+ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus3),false);
if( sd->followtimer != -1 )
pc_stop_following(sd);