Fix OP_SUB to use RK() too...

Sat, 20 Nov 2010 12:10:53 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 20 Nov 2010 12:10:53 +0000
changeset 95
c461e20b609a
parent 94
cae5af994f75
child 96
e4324d9a824c

Fix OP_SUB to use RK() too...

lvm.js file | annotate | diff | comparison | revisions
--- a/lvm.js	Sat Nov 20 11:11:56 2010 +0000
+++ b/lvm.js	Sat Nov 20 12:10:53 2010 +0000
@@ -576,8 +576,8 @@
 				frame.reg[INS_A(instruction)] = RB.add(RC);
 				break;
 			case OP_SUB:
-				var RB = frame.reg[INS_B(instruction)];
-				var RC = frame.reg[INS_C(instruction)];
+				var RB = RK(frame, INS_B(instruction));
+				var RC = RK(frame, INS_C(instruction));
 				frame.reg[INS_A(instruction)] = new LValue(this, "number", RB.value - RC.value);
 				break;
 			case OP_EQ:

mercurial