diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-05-19 15:54:33 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-05-19 15:54:33 +0200 |
commit | d7f4cd696c9245870eabd5f57d3000a70aaad64b (patch) | |
tree | da25e9bb7350d85b695518a622568ff1967d981a | |
parent | 6e2e6f1607857810ccfdb20a160284b920f716c9 (diff) | |
download | fengari-d7f4cd696c9245870eabd5f57d3000a70aaad64b.tar.gz fengari-d7f4cd696c9245870eabd5f57d3000a70aaad64b.tar.bz2 fengari-d7f4cd696c9245870eabd5f57d3000a70aaad64b.zip |
test dead_weak for undefined in luaH_next
-rw-r--r-- | src/ltable.js | 2 |
1 files changed, 1 insertions, 1 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'")); |