summaryrefslogtreecommitdiff
path: root/src/lua.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua.js')
-rw-r--r--src/lua.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua.js b/src/lua.js
index 4710ded..85d4b64 100644
--- a/src/lua.js
+++ b/src/lua.js
@@ -135,6 +135,8 @@ class lua_Debug {
}
const to_luastring = function(str, maxBytesToWrite) {
+ assert(typeof str === "string", "to_luastring expect a js string");
+
maxBytesToWrite = maxBytesToWrite !== undefined ? maxBytesToWrite : Number.MAX_SAFE_INTEGER;
let outU8Array = [];