fixed string parsing...I thought I tested this!

Apparently I messed up string parsing. I thought I had tested this-maybe
I only tried a empty string or something.
Also, warning for future people reading this saga of insanity: Do not
write code while tired.
This commit is contained in:
gamemanj
2015-04-01 00:28:26 +01:00
parent 39809ceda4
commit 564bb31c49

View File

@ -385,14 +385,13 @@ local function lexLua(code)
local inEscape=true
local rstr=""
for i=1,str:len() do
local c=str:sub(1,1)
local c=str:sub(i,i)
rstr=rstr..c
if inEscape then
rstr=rstr..c
inEscape=false
else
if c==quoteType then return rstr..quoteType end
if c==quoteType then return rstr end
if c=="\\" then inEscape=true end
rstr=rstr..c
end
end
return nil --unfinished string