codegen.c: assign post assignees for fixed number of RHS.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-02-22 17:20:00 +09:00
parent ae231924a9
commit 75e86dcfcd
+8 -2
View File
@@ -2745,8 +2745,14 @@ codegen(codegen_scope *s, node *tree, int val)
}
if (t->cdr && t->cdr->car) {
t = t->cdr->car;
while (n<len) {
gen_assignment(s, t->car, NULL, rhs+n, NOVAL);
while (t) {
if (n<len) {
gen_assignment(s, t->car, NULL, rhs+n, NOVAL);
}
else {
genop_1(s, OP_LOADNIL, cursp());
gen_assignment(s, t->car, NULL, cursp(), NOVAL);
}
t = t->cdr;
n++;
}