[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.
This commit is contained in:
Charlie Brej 2009-06-30 15:28:31 +01:00 committed by Ray Strode
parent 8786b2eba6
commit 985a3c030e

View file

@ -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);