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 inEscape=true
local rstr="" local rstr=""
for i=1,str:len() do for i=1,str:len() do
local c=str:sub(1,1) local c=str:sub(i,i)
if inEscape then
rstr=rstr..c rstr=rstr..c
if inEscape then
inEscape=false inEscape=false
else else
if c==quoteType then return rstr..quoteType end if c==quoteType then return rstr end
if c=="\\" then inEscape=true end if c=="\\" then inEscape=true end
rstr=rstr..c
end end
end end
return nil --unfinished string return nil --unfinished string