summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-29 15:10:00 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-29 15:10:00 +0000
commitdc28a60fa9820fb455408c5c1f80b514ba241cbc (patch)
treef3d2839e5a6386478e95501d060c43714f2454ea /src/map/script.c
parenta9ee3b5cbf3d446ec888b7abbfa95c451ada2815 (diff)
downloadhercules-dc28a60fa9820fb455408c5c1f80b514ba241cbc.tar.gz
hercules-dc28a60fa9820fb455408c5c1f80b514ba241cbc.tar.bz2
hercules-dc28a60fa9820fb455408c5c1f80b514ba241cbc.tar.xz
hercules-dc28a60fa9820fb455408c5c1f80b514ba241cbc.zip
Fixed segmentation fault in script engine when activating DEBUG_RUN flag
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7970 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index afa8b113a..729294f48 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2458,6 +2458,7 @@ int run_func(struct script_state *st)
int i,start_sp,end_sp,func;
end_sp=st->stack->sp;
+ func=st->stack->stack_data[st->start].u.num;
#ifdef DEBUG_RUN
if(battle_config.etc_log) {
ShowDebug("run_func : %s? (%d(%d)) sp=%d (%d...%d)\n",str_buf+str_data[func].str, func, str_data[func].type, st->stack->sp, st->start, st->end);
@@ -2502,7 +2503,6 @@ int run_func(struct script_state *st)
st->start=i-1;
st->end=end_sp;
- func=st->stack->stack_data[st->start].u.num;
if(str_data[func].type!=C_FUNC ){
ShowMessage ("run_func: '"CL_WHITE"%s"CL_RESET"' (type %d) is not function and command!\n");
// st->stack->sp=0;