From 69b1826d638aed6994fc44b2fd07be256be3e867 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 19 May 2024 13:21:42 +0900 Subject: [PATCH] SR_ASSIGN does not take a struct type in ain v1 --- src/vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index 099bb8d..c735f96 100644 --- a/src/vm.c +++ b/src/vm.c @@ -1620,7 +1620,8 @@ static enum opcode execute_instruction(enum opcode opcode) break; } case SR_ASSIGN: { - stack_pop(); // struct type + if (ain->version > 1) + stack_pop(); // struct type int rval = stack_pop().i; int lval = stack_pop().i; heap_struct_assign(lval, rval);