Skip to content

"." in key causes error #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

"." in key causes error #68

MikeSenko opened this issue Dec 31, 2013 · 2 comments

Comments

@MikeSenko
Copy link

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
Copy link
Member

Hi @MikeSenko fixed.

@willzhanglala
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants