Closed Nevlabs closed 2 years ago
The array part of the lua table is only design for integer. All types that are fit in an integer are okay. UInt32, UInt64 and Int64 are an problem and will result in exceptions.
I did a little fix. Now it works, but it will result in endless loops? I need more test cases for these part.
Now it should work as intented.
NeoLua Version: 1.3.13 Example to reproduce: uint key = 2; var code = @" local tbl = {} tbl[key] = 5 return tbl[key]";
var lua = new Lua(); dynamic env = lua.CreateEnvironment();
env.key = key;
var chunk = lua.CompileChunk(code, "lua.lua", new LuaCompileOptions());
var r = env.dochunk(chunk);
Works fine if key type would be int or ushort.