From 985a3c030e68941dfa35fc9d2daf9c4df901e2ea Mon Sep 17 00:00:00 2001 From: Charlie Brej Date: Tue, 30 Jun 2009 15:28:31 +0100 Subject: [PATCH] [script] Deref the state to allow local and global to be reassigned This should allow local and global to be assigned to a different vareable. This is discouriged as it may cause asserts to fail, but may be useful to save current state and continue the function at a later time. --- src/plugins/splash/script/script-execute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/splash/script/script-execute.c b/src/plugins/splash/script/script-execute.c index 2b8c0868..f2edcccf 100644 --- a/src/plugins/splash/script/script-execute.c +++ b/src/plugins/splash/script/script-execute.c @@ -366,6 +366,8 @@ static script_obj* script_evaluate_var (script_state* state, script_exp* exp) { char* name = exp->data.string; script_obj* obj; + script_obj_deref(&state->global); + script_obj_deref(&state->local); assert (state->global->type == SCRIPT_OBJ_TYPE_HASH); assert (state->local->type == SCRIPT_OBJ_TYPE_HASH);