summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-21 19:01:49 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-21 19:12:52 +1000
commitc09ab00b85677881f0ca0424b27ad14521e4a770 (patch)
tree6eff3217b3ecf9c75d74de3e9e4751020e555619 /src/lvm.js
parentbdaa2a67b491bfc1d9521778cb3d13d386f97f93 (diff)
downloadfengari-c09ab00b85677881f0ca0424b27ad14521e4a770.tar.gz
fengari-c09ab00b85677881f0ca0424b27ad14521e4a770.tar.bz2
fengari-c09ab00b85677881f0ca0424b27ad14521e4a770.zip
src/lvm.js: integer unary minus need to be bitwise or-d
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index b00333a..6eea8f3 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -376,7 +376,7 @@ const luaV_execute = function(L) {
let numberop = tonumber(op);
if (op.ttisinteger()) {
- L.stack[ra] = new lobject.TValue(CT.LUA_TNUMINT, -op.value);
+ L.stack[ra] = new lobject.TValue(CT.LUA_TNUMINT, (-op.value)|0);
} else if (numberop !== false) {
L.stack[ra] = new lobject.TValue(CT.LUA_TNUMFLT, -numberop);
} else {