summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-24 23:31:14 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-24 23:31:14 +0000
commitc4b3fec1c9f33f607f9c07d4a65dbdd96c995e8d (patch)
tree64a8ae2418b090e0730bb3800820d2e405970827
parent7247e02433c4257eec62c43e7e478c7eb3776b1d (diff)
downloadhercules-c4b3fec1c9f33f607f9c07d4a65dbdd96c995e8d.tar.gz
hercules-c4b3fec1c9f33f607f9c07d4a65dbdd96c995e8d.tar.bz2
hercules-c4b3fec1c9f33f607f9c07d4a65dbdd96c995e8d.tar.xz
hercules-c4b3fec1c9f33f607f9c07d4a65dbdd96c995e8d.zip
* 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).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14497 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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);