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, 1 insertions, 1 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 44d8c9b..7c81045 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -313,7 +313,7 @@ const luaO_chunkid = function(source, bufflen) {
out = source.slice(1);
else { /* add '...' before rest of name */
bufflen -= RETS.length;
- out = RETS.concat(source.slice(1, l - bufflen));
+ out = RETS.concat(source.slice(1 + l - bufflen));
}
} else { /* string; format as [string "source"] */
let nli = source.indexOf(char['\n']); /* find first new line (if any) */