mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
allow t[nil] => nil in table returned by sharedata (#2037)
This commit is contained in:
@@ -540,7 +540,9 @@ lindexconf(lua_State *L) {
|
|||||||
int keytype;
|
int keytype;
|
||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
const char * str = NULL;
|
const char * str = NULL;
|
||||||
if (kt == LUA_TNUMBER) {
|
if (kt == LUA_TNIL) {
|
||||||
|
return 0;
|
||||||
|
} else if (kt == LUA_TNUMBER) {
|
||||||
if (!lua_isinteger(L, 2)) {
|
if (!lua_isinteger(L, 2)) {
|
||||||
return luaL_error(L, "Invalid key %f", lua_tonumber(L, 2));
|
return luaL_error(L, "Invalid key %f", lua_tonumber(L, 2));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user