lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Is the same change needed in the VM's LOADBOOL?

Yes, some change is needed, thanks for pointing it out, but I'm not sure
it's in the VM (though it's the easiest fix).

Here is an "attack" in the lines you suggest:

f=loadstring([[
local a=true
print(a,a==true,a==false)
if a then
	print"a is true"
else
	print"a is false"
end
]],"=")

s=string.dump(f)

s=s:sub(1,37)..string.char(1)..s:sub(39)

g=loadstring(s)

f()
g()