summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lauxlib.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 2276bd0..9d414b2 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -482,6 +482,7 @@ const luaL_prepbuffer = function(B) {
const luaL_addlstring = function(B, s, l) {
if (l > 0) {
+ s = from_userstring(s);
let b = luaL_prepbuffsize(B, l);
b.set(s.subarray(0, l));
luaL_addsize(B, l);
@@ -489,6 +490,7 @@ const luaL_addlstring = function(B, s, l) {
};
const luaL_addstring = function(B, s) {
+ s = from_userstring(s);
luaL_addlstring(B, s, s.length);
};