فهرست منبع

Fix at "callfunc" script command. bugreport:7246.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17125 54d463be-8e91-2dee-dedb-b68131a5f0ec
ediejohnny 12 سال پیش
والد
کامیت
eec1d7aeca
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      src/map/script.c

+ 3 - 5
src/map/script.c

@@ -4780,7 +4780,7 @@ BUILDIN_FUNC(callfunc)
 		st->state = END;
 		return 1;
 	}
-
+	
 	for( i = st->start+3, j = 0; i < st->end; i++, j++ )
 	{
 		struct script_data* data = push_copy(st->stack,i);
@@ -4788,10 +4788,8 @@ BUILDIN_FUNC(callfunc)
 		{
 			const char* name = reference_getname(data);
 			if( name[0] == '.' ) {
-				if ( !ref )	{
-					ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1);
-					ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars);
-				}
+				ref = (struct DBMap**)aCalloc(sizeof(struct DBMap*), 1);
+				ref[0] = (name[1] == '@' ? st->stack->var_function : st->script->script_vars);
 				data->ref = ref;
 			}
 		}