From eb71fa819bf294cb145360ce2d4697200b30bd11 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 13 Dec 2017 13:36:59 +1100 Subject: src/llex.js: Fix incorrect slice length --- src/llex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/llex.js b/src/llex.js index 464c98e..5bcd744 100644 --- a/src/llex.js +++ b/src/llex.js @@ -325,7 +325,7 @@ const read_long_string = function(ls, seminfo, sep) { } if (seminfo) - seminfo.ts = luaX_newstring(ls, ls.buff.buffer.slice(2 + sep, 2 + sep - 2 * (2 + sep))); + seminfo.ts = luaX_newstring(ls, ls.buff.buffer.slice(2 + sep, ls.buff.n - (2 + sep))); }; const esccheck = function(ls, c, msg) { -- cgit v1.2.3-70-g09d2