You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lua allows the metatables __index entry to be a table (and not only a function). In this case the value from the __index table is returned, if found. See http://www.lua.org/pil/13.4.1.html
With this contruct a request to any table entry from C# fails. Proof:
dynamicmt=lua.NewTable("mt");mt.__index=lua("return { a = 5 }");dynamictab=lua.NewTable("tab");tab.a=4;tab.SetMetatable(mt);Console.WriteLine(tab.a);//crash
The text was updated successfully, but these errors were encountered:
Lua allows the metatables
__index
entry to be a table (and not only a function). In this case the value from the__index
table is returned, if found. See http://www.lua.org/pil/13.4.1.htmlWith this contruct a request to any table entry from C# fails. Proof:
The text was updated successfully, but these errors were encountered: