aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/interpret.h b/interpret.h
index ef087951..0dc261d6 100644
--- a/interpret.h
+++ b/interpret.h
@@ -743,6 +743,7 @@ mod:
break;
case Op_clear_var:
+ {
/*
* Clear variable to the undefined value
* that is equal to 0 and "" represented by
@@ -751,7 +752,8 @@ mod:
* locals, which may re-use previously
* initialized frame locations.
*/
- lhs = get_lhs(pc->memory, false);
+ NODE *var = pc->memory;
+ lhs = get_lhs(var, false);
/*
* If it's already clear, nothing to do
@@ -760,6 +762,8 @@ mod:
unref(*lhs);
*lhs = dupnode(Nnull_string);
}
+ var->type = Node_var_new;
+ }
break;
case Op_store_field: