mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix lua::getfield and events registering
This commit is contained in:
parent
51531e2621
commit
bb35fc665f
1 changed files with 1 additions and 1 deletions
|
|
@ -455,7 +455,7 @@ namespace lua {
|
||||||
|
|
||||||
inline bool getfield(lua::State* L, const std::string& name, int idx = -1) {
|
inline bool getfield(lua::State* L, const std::string& name, int idx = -1) {
|
||||||
lua_getfield(L, idx, name.c_str());
|
lua_getfield(L, idx, name.c_str());
|
||||||
if (isnil(L, idx)) {
|
if (isnoneornil(L, -1)) {
|
||||||
pop(L);
|
pop(L);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue