summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/llex.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/llex.js b/src/llex.js
index 9983c1d..bf7463c 100644
--- a/src/llex.js
+++ b/src/llex.js
@@ -356,7 +356,14 @@ const read_long_string = function(ls, seminfo, sep) {
}
if (seminfo)
- seminfo.ts = new TValue(CT.LUA_TLNGSTR, lua.to_luastring(ls.buff.buffer.slice(2 + sep).join('')));
+ seminfo.ts = new TValue(
+ CT.LUA_TLNGSTR,
+ lua.to_luastring(
+ ls.buff.buffer
+ .slice(2 + sep, 2 + sep - 2 * (2 + sep))
+ .join('')
+ )
+ );
};
const esccheck = function(ls, c, msg) {