summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-11-26 00:42:03 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-11-26 00:43:39 +0900
commit28bd33297ad42c2eed1cca45345166a072b3bbf2 (patch)
treefe0d402b735a49961ac56f00f43af85d4a0c0cec
parentc424892c5eea569a636b70fbb9d4beb68cfb4e93 (diff)
downloadmruby-28bd33297ad42c2eed1cca45345166a072b3bbf2.tar.gz
mruby-28bd33297ad42c2eed1cca45345166a072b3bbf2.zip
wrong register number adjustment in multiple assignment; fix #2654
-rw-r--r--src/codegen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 1701e4c8e..a880244cc 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1003,7 +1003,6 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
genop(s, MKOP_AB(OP_MOVE, cursp(), rhs));
push();
}
- pop();
genop(s, MKOP_ABC(OP_APOST, cursp(), n, post));
n = 1;
if (t->car) { /* rest */
@@ -1018,7 +1017,7 @@ gen_vmassignment(codegen_scope *s, node *tree, int rhs, int val)
}
}
}
- else if (val) {
+ if (!val) {
pop();
}
}