From ebf729d811e469b0cba66091ba5bbdc50b8fb670 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 10 Apr 2017 08:14:12 +0200 Subject: Fixed bad OP constants --- src/lcode.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lcode.js') diff --git a/src/lcode.js b/src/lcode.js index aefad20..0b3d9bd 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -17,9 +17,9 @@ const TValue = lobject.TValue; const luaO_arith = function(L, op, p1, p2, res) { switch (op) { - case lvm.LUA_OPBAND: case lvm.LUA_OPBOR: case lvm.LUA_OPBXOR: - case lvm.LUA_OPSHL: case lvm.LUA_OPSHR: - case lvm.LUA_OPBNOT: { /* operate only on integers */ + case lua.LUA_OPBAND: case lua.LUA_OPBOR: case lua.LUA_OPBXOR: + case lua.LUA_OPSHL: case lua.LUA_OPSHR: + case lua.LUA_OPBNOT: { /* operate only on integers */ let i1 = lvm.tointeger(p1); let i2 = lvm.tointeger(p2); if (i1 !== false && i2 !== false) { @@ -29,7 +29,7 @@ const luaO_arith = function(L, op, p1, p2, res) { } else break; /* go to the end */ } - case lvm.LUA_OPDIV: case lvm.LUA_OPPOW: { /* operate only on floats */ + case lua.LUA_OPDIV: case lua.LUA_OPPOW: { /* operate only on floats */ let n1 = lvm.tonumber(p1); let n2 = lvm.tonumber(p2); if (n1 !== false && n2 !== false) { -- cgit v1.2.3-54-g00ecf