"." in key causes error #68

Closed
MikeSenko opened this Issue Dec 31, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@MikeSenko

Although sloppy, the following is valid in Lua:
local junk = {} -- Create table
key = "dot.dot" -- Create the key
junk[key] = 1 -- assign value

Attempting the same thing from the C# side of NLua seems to cause an error:

LuaTable junk = (LuaTable) lua.DoString("return {}")[0]; // Create the table
string key = "dot.dot"; // Create the key
junk[key] = 1; // This causes a Lua error

@viniciusjarina

This comment has been minimized.

Show comment
Hide comment
Member

viniciusjarina commented Jul 13, 2014

Hi @MikeSenko fixed.

@willzhanglala

This comment has been minimized.

Show comment
Hide comment
@willzhanglala

willzhanglala May 23, 2017

I don't think it's a fix. We don't want a implicit split a dot.
it't junk["dot.dot"] = 1, that should not means junk.dot.dot = 1
it should only means junk["dot.dot"] =1

The behaviour should be same
This crash still occurs in the LuaTable
LuaTable tb= Lua.NewTable("abcdefg")
tb["dot.dot"]= 1 will also crashes

willzhanglala commented May 23, 2017

I don't think it's a fix. We don't want a implicit split a dot.
it't junk["dot.dot"] = 1, that should not means junk.dot.dot = 1
it should only means junk["dot.dot"] =1

The behaviour should be same
This crash still occurs in the LuaTable
LuaTable tb= Lua.NewTable("abcdefg")
tb["dot.dot"]= 1 will also crashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment