summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 ed9345678..b355dfa9e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5703,7 +5703,7 @@ BUILDIN(return) {
if( !st->script->local.arrays )
st->script->local.arrays = idb_alloc(DB_OPT_BASE);
data->ref->arrays = st->script->local.arrays;
- } else if ( name[0] == '.' /* && data->ref != NULL */ ) {
+ } else if ( name[0] == '.' && data->ref->vars == st->stack->stack_data[st->stack->defsp-1].u.ri->script->local.vars ) {
data->ref = NULL; // Reference to the parent scope's script, remove reference pointer.
}
}