allow t[nil] => nil in table returned by sharedata (#2037)

This commit is contained in:
Tom Lau
2025-03-06 12:03:30 +08:00
committed by GitHub
parent ad96b6c736
commit 93e72a92ac

View File

@@ -540,7 +540,9 @@ lindexconf(lua_State *L) {
int keytype;
size_t sz = 0;
const char * str = NULL;
if (kt == LUA_TNUMBER) {
if (kt == LUA_TNIL) {
return 0;
} else if (kt == LUA_TNUMBER) {
if (!lua_isinteger(L, 2)) {
return luaL_error(L, "Invalid key %f", lua_tonumber(L, 2));
}