diff options
Diffstat (limited to 'src/lvm.js')
-rw-r--r-- | src/lvm.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -166,7 +166,12 @@ const luaV_execute = function(L) { break; } case OCi.OP_SETUPVAL: { - cl.upvals[i.B].setval(L, ra); + let uv = cl.upvals[i.B]; + if (uv.v !== null) { + uv.L.stack[uv.v] = L.stack[ra]; + } else { + uv.value.setfrom(L.stack[ra]); + } break; } case OCi.OP_GETTABUP: { |