summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 0ef6e9a..3d9edb0 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -221,6 +221,8 @@ const PRE = "[string \"";
const POS = "\"]";
const luaO_chunkid = function(source, bufflen) {
+ source = source instanceof TValue ? source.value : source;
+ bufflen = bufflen instanceof TValue ? bufflen.value : bufflen;
let l = source.length;
let out = "";
if (source[0] === '=') { /* 'literal' source */