aboutsummaryrefslogtreecommitdiff
path: root/src/lcode.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-10 08:14:12 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-10 08:14:12 +0200
commitebf729d811e469b0cba66091ba5bbdc50b8fb670 (patch)
treec37e2721fc121eaed6c091fbcf9ff5d8e99e22ba /src/lcode.js
parentb303b1d4d12e6e8618e606ad04c32e45c235c93a (diff)
downloadfengari-ebf729d811e469b0cba66091ba5bbdc50b8fb670.tar.gz
fengari-ebf729d811e469b0cba66091ba5bbdc50b8fb670.tar.bz2
fengari-ebf729d811e469b0cba66091ba5bbdc50b8fb670.zip
Fixed bad OP constants
Diffstat (limited to 'src/lcode.js')
-rw-r--r--src/lcode.js8
1 files changed, 4 insertions, 4 deletions
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) {