Deny use NaN as index in rawset.
This commit is contained in:
@@ -299,7 +299,8 @@ public class BaseLib extends TwoArgFunction implements ResourceFinder {
|
|||||||
}
|
}
|
||||||
public LuaValue call(LuaValue table, LuaValue index, LuaValue value) {
|
public LuaValue call(LuaValue table, LuaValue index, LuaValue value) {
|
||||||
LuaTable t = table.checktable();
|
LuaTable t = table.checktable();
|
||||||
t.rawset(index.checknotnil(), value);
|
if (!index.isvalidkey()) argerror(2, "value");
|
||||||
|
t.rawset(index, value);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user