summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lvm.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 3697008..ad1e807 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -137,12 +137,14 @@ const luaV_execute = function(L) {
break;
}
case OCi.OP_LOADK: {
- L.stack[ra] = k[i.Bx];
+ let konst = k[i.Bx];
+ L.stack[ra] = new TValue(konst.type, konst.value);
break;
}
case OCi.OP_LOADKX: {
assert(ci.u.l.savedpc[ci.pcOff].opcode === OCi.OP_EXTRAARG);
- L.stack[ra] = k[ci.u.l.savedpc[ci.pcOff++].Ax];
+ let konst = k[ci.u.l.savedpc[ci.pcOff++].Ax];
+ L.stack[ra] = new TValue(konst.type, konst.value);
break;
}
case OCi.OP_LOADBOOL: {