summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-09 18:31:47 +0100
committerHaru <haru@dotalux.com>2013-12-09 18:45:34 +0100
commitc3c5e31443c218fb7fbf42b2c48d158b01f37131 (patch)
tree6e808a112286ef02e4ab7c9843b3f02ab42204d4 /src/map
parent3e90bda07068e8662a7fcaf8b1a4e82bbdf0fd4d (diff)
downloadhercules-c3c5e31443c218fb7fbf42b2c48d158b01f37131.tar.gz
hercules-c3c5e31443c218fb7fbf42b2c48d158b01f37131.tar.bz2
hercules-c3c5e31443c218fb7fbf42b2c48d158b01f37131.tar.xz
hercules-c3c5e31443c218fb7fbf42b2c48d158b01f37131.zip
Fixed a crash when casting GN_SPORE_EXPLOSION on certain systems.
- Follow-up to 44c33fda3614d588e6bf6cee1cf884e98f1531f0. - Also fixed some incorrect va_end calls that came up while debugging. - Special thanks to Ind for his help debugging the problem. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c1
-rw-r--r--src/map/map.c2
-rw-r--r--src/map/skill.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4e10e2eea..675cfba9b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18250,6 +18250,7 @@ static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...)
packet_db[cmd].pos[i] = pos;
}
+ va_end(va);
}
void packetdb_loaddb(void) {
diff --git a/src/map/map.c b/src/map/map.c
index 874dca08c..5db2d8480 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -695,7 +695,7 @@ int map_vforeachinrange(int (*func)(struct block_list*, va_list), struct block_l
va_copy(apcopy, ap);
returnCount = bl_vforeach(func, blockcount, INT_MAX, apcopy);
- va_end(ap);
+ va_end(apcopy);
return returnCount;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 1f9a8c15b..541e1b389 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3198,7 +3198,7 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
break;
case GN_SPORE_EXPLOSION:
map->foreachinrange(skill->area_sub, target, skill->get_splash(skl->skill_id, skl->skill_lv), BL_CHAR,
- src, skl->skill_id, skl->skill_lv, 0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id);
+ src, skl->skill_id, skl->skill_lv, (int64)0, skl->flag|1|BCT_ENEMY, skill->castend_damage_id);
break;
case SR_FLASHCOMBO_ATK_STEP1:
case SR_FLASHCOMBO_ATK_STEP2: