aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2024-01-12 15:12:10 -0800
committerPreston Pan <preston@nullring.xyz>2024-01-12 15:12:10 -0800
commit50c4723dee869078ebb00f1ced484686f38430dc (patch)
tree43e169f5092959f318658c676b1645c9a0f0d023 /src
parent0045795a808d2017bd8e7db9b43a57192ba5eed7 (diff)
fix keep?
Diffstat (limited to 'src')
-rw-r--r--src/builtins.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/builtins.c b/src/builtins.c
index 5c42516..a189060 100644
--- a/src/builtins.c
+++ b/src/builtins.c
@@ -570,16 +570,16 @@ void keep(value_t *v) {
}
array_append(STACK, value_copy(v1));
- if (v2->type == VQUOTE) {
- array_append(EVAL_STACK, v2);
- for (int i = 0; i < v2->quote->size; i++) {
- eval(value_copy(v2->quote->items[i]));
+ if (v1->type == VQUOTE) {
+ array_append(EVAL_STACK, v1);
+ for (int i = 0; i < v1->quote->size; i++) {
+ eval(value_copy(v1->quote->items[i]));
}
value_free(array_pop(EVAL_STACK));
} else {
eval(v1);
}
- array_append(STACK, v1);
+ array_append(STACK, v2);
}
void del(value_t *v) {