Closed wrefgtzweve closed 1 year ago
Oh wow, this is a very obscure feature of Lua. I had to go scour into luajit's source code to even find what it means. The \z
escape character, which isn't even in the PIL, tells the lexer to ignore any further whitespace.
That means that this:
print("a\z b\z
c")
Is not only valid Lua, it prints abc
. Without the \z
before the newline, you'd get an error about an unfinished string, but with the \z
, the whitespace is ignored on lexing level
That is very sneaky. I'll look at how this can be fixed in glualint :+1:
Side question for curiosity, how did you come to know about this feature? I don't see it documented anywhere.
I see that this is a continuation of #100, where support was added for \z
. It looks like this works fine when you actually put whitespace after the \z
, but not when you place any other character.
Thanks for reporting! Fixed in https://github.com/FPtje/GLuaFixer/releases/tag/1.24.3!
Side question for curiosity, how did you come to know about this feature? I don't see it documented anywhere.
some random backdoored addon had obfuscated code in it using these symbols
Example code
However it works when ran