fix lua::getfield and events registering

This commit is contained in:
MihailRis 2025-09-14 22:26:22 +03:00
parent 51531e2621
commit bb35fc665f

View File

@ -455,7 +455,7 @@ namespace lua {
inline bool getfield(lua::State* L, const std::string& name, int idx = -1) {
lua_getfield(L, idx, name.c_str());
if (isnil(L, idx)) {
if (isnoneornil(L, -1)) {
pop(L);
return false;
}