summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-17 16:25:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-17 16:25:22 +0800
commit69b22d87c64af7e6da633366c45b44735f92ef0a (patch)
tree728113bbd23a2d16b4c279f9645e5db98934978a /script/parser
parentcf098b819daf9955b46ad4c4c0d7e0e544dd547c (diff)
downloadlua-language-server-69b22d87c64af7e6da633366c45b44735f92ef0a.zip
fix #1825
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/compile.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index 95483cc7..f8808d5a 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -433,7 +433,7 @@ local function resolveLongString(finishMark)
end
if finishMark == ']]' and State.version == 'Lua 5.1' then
local nestOffset = sfind(Lua, '[[', start, true)
- if nestOffset then
+ if nestOffset and nestOffset < finishOffset then
fastForwardToken(nestOffset)
local nestStartPos = getPosition(nestOffset, 'left')
local nestFinishPos = getPosition(nestOffset + 1, 'right')