提交 fcc205e6 编写于 作者: J johnche(车雄生)

LoadField如果输入的是负数,应该转为正数位置

上级 bd655e4e
......@@ -28,6 +28,7 @@ namespace XLua
{
public static bool LoadField(RealStatePtr L, int idx, string field_name)
{
idx = idx > 0 ? idx : LuaAPI.lua_gettop(L) + idx + 1;// abs of index
LuaAPI.xlua_pushasciistring(L, field_name);
LuaAPI.lua_rawget(L, idx);
return !LuaAPI.lua_isnil(L, -1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册