summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-14 15:19:12 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-14 15:19:12 +0200
commit3152eb68f451568ee547eef3772d0070642d9b2e (patch)
tree30feac853512790ca88a2b346caba28d72ecdb3b /src/lvm.js
parent8e05003853773ef4d38913858ee4fc636bed21ac (diff)
downloadfengari-3152eb68f451568ee547eef3772d0070642d9b2e.tar.gz
fengari-3152eb68f451568ee547eef3772d0070642d9b2e.tar.bz2
fengari-3152eb68f451568ee547eef3772d0070642d9b2e.zip
Fixed boolean comparison
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index a2a8feb..efbb7e7 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -775,9 +775,10 @@ const luaV_equalobj = function(L, t1, t2) {
switch(t1.ttype()) {
case CT.LUA_TNIL:
return 1;
+ case CT.LUA_TBOOLEAN:
+ return t1.value == t2.value ? 1 : 0; // Might be 1 or true
case CT.LUA_TNUMINT:
case CT.LUA_TNUMFLT:
- case CT.LUA_TBOOLEAN:
case CT.LUA_TLCF:
return t1.value === t2.value ? 1 : 0;
case CT.LUA_TSHRSTR: