summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;