aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-20 12:20:24 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-20 16:56:22 +0200
commit4512e064eac90fa8193329fdd78a873bc0cf2b5e (patch)
treea19c08ed0341b52ae640af81d1a923d52a2b48b3 /src
parentcc5664dc1fca1d726c744165393d7137eea7bd83 (diff)
parentd8e0d9fdde537bbafb244a60ebaa40b647481a5f (diff)
downloadfengari-4512e064eac90fa8193329fdd78a873bc0cf2b5e.tar.gz
fengari-4512e064eac90fa8193329fdd78a873bc0cf2b5e.tar.bz2
fengari-4512e064eac90fa8193329fdd78a873bc0cf2b5e.zip
Merge branch 'master' of https://github.com/fengari-lua/fengari into test-suite
Diffstat (limited to 'src')
-rw-r--r--src/ltable.js2
-rw-r--r--src/lvm.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ltable.js b/src/ltable.js
index a06e5d8..e4d21e2 100644
--- a/src/ltable.js
+++ b/src/ltable.js
@@ -187,7 +187,7 @@ const luaH_next = function(L, table, keyI) {
return false;
} else {
/* Try dead keys */
- entry = table.dead_weak.get(hash) || table.dead_strong.get(hash);
+ entry = (table.dead_weak && table.dead_weak.get(hash)) || table.dead_strong.get(hash);
if (!entry)
/* item not in table */
return ldebug.luaG_runerror(L, defs.to_luastring("invalid key to 'next'"));
diff --git a/src/lvm.js b/src/lvm.js
index df4f62f..6857b1d 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -835,7 +835,7 @@ const LTnum = function(l, r) {
if (r.ttisinteger())
return l.value < r.value ? 1 : 0;
else
- return LTintfloat(r.value, l.value);
+ return LTintfloat(l.value, r.value);
} else {
if (r.ttisfloat())
return l.value < r.value ? 1 : 0;