summaryrefslogtreecommitdiff
path: root/src/ltablib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ltablib.js')
-rw-r--r--src/ltablib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ltablib.js b/src/ltablib.js
index c45f7e5..eaaf24d 100644
--- a/src/ltablib.js
+++ b/src/ltablib.js
@@ -163,7 +163,7 @@ const pack = function(L) {
for (let i = n; i >= 1; i--) /* assign elements */
lapi.lua_seti(L, 1, i);
lapi.lua_pushinteger(L, n);
- lapi.lua_setfield(L, 1, "n"); /* t.n = number of elements */
+ lapi.lua_setfield(L, 1, ["n".charCodeAt(0)]); /* t.n = number of elements */
return 1; /* return table */
};