summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-02 11:56:54 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-02 12:52:57 +0100
commit8785e3801b3bd4b3add20f004c9492565fb77fbd (patch)
tree303c831d4c22e138a4e2ce2cbf61921e35dfc4f4 /src/lobject.js
parent57de149902761c4ed5d9c199fd0818aad781bde3 (diff)
downloadfengari-8785e3801b3bd4b3add20f004c9492565fb77fbd.tar.gz
fengari-8785e3801b3bd4b3add20f004c9492565fb77fbd.tar.bz2
fengari-8785e3801b3bd4b3add20f004c9492565fb77fbd.zip
[Parsing tests] SETLIST
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 */