mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-07-01 15:20:23 +02:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user