summaryrefslogtreecommitdiff
path: root/src/ltable.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-12 10:38:13 +0100
committerBenoit Giannangeli <giann@users.noreply.github.com>2017-03-13 11:03:24 +0100
commit883d01f0a707a03ef5b183cd2d03046fdc544e0e (patch)
tree33631e31bfa1d925735303cb3e6fac5265fa62ee /src/ltable.js
parent52fa5f8a97fd5322fcb110298c4ce14328074818 (diff)
downloadfengari-883d01f0a707a03ef5b183cd2d03046fdc544e0e.tar.gz
fengari-883d01f0a707a03ef5b183cd2d03046fdc544e0e.tar.bz2
fengari-883d01f0a707a03ef5b183cd2d03046fdc544e0e.zip
[Strings] ltable.js, ltm.js
Diffstat (limited to 'src/ltable.js')
-rw-r--r--src/ltable.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ltable.js b/src/ltable.js
index 7611b4c..36928d5 100644
--- a/src/ltable.js
+++ b/src/ltable.js
@@ -22,8 +22,8 @@ Table.prototype.ordered_indexes = function() {
.sort(function(a, b) {
if (typeof a !== "number") return 1;
if (typeof b !== "number") return -1;
- return a > b ? 1 : -1
- })
+ return a > b ? 1 : -1;
+ });
};
/*
@@ -64,7 +64,7 @@ Table.prototype.luaH_next = function(L, keyI) {
if (tnidx === 'number' && nidx % 1 === 0)
L.stack[keyI] = new TValue(CT.LUA_TNUMINT, indexes[i + 1]);
else if (tnidx === 'string')
- L.stack[keyI] = new TValue(CT.LUA_TLNGSTR, indexes[i + 1]);
+ L.stack[keyI] = L.l_G.strt.get(indexes[i + 1]);
else
L.stack[keyI] = indexes[i + 1];