summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lapi.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lapi.js b/src/lapi.js
index aa8cf04..a7fbc91 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -527,7 +527,8 @@ const lua_getupvalue = function(L, funcindex, n) {
L.stack[L.top++] = new TValue(val.type, val.value);
- return name;
+ // FIXME: should always be a lua string
+ return typeof name === 'string' ? defs.to_luastring(name) : name;
}
return null;
};
@@ -544,7 +545,8 @@ const lua_setupvalue = function(L, funcindex, n) {
val.type = L.stack[L.top].type;
val.value = L.stack[L.top].value;
- return name;
+ // FIXME: should always be a lua string
+ return typeof name === 'string' ? defs.to_luastring(name) : name;
}
return null;
};