Skip to content
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

"." in key causes error #68

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

@MikeSenko MikeSenko commented Dec 31, 2013

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

@viniciusjarina viniciusjarina commented Jul 13, 2014

Hi @MikeSenko fixed.

@willzhanglala
Copy link

@willzhanglala 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.