diff options
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r-- | plugins/MirLua/src/mlua_metatable.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h index 0946eb9caa..13c2d614e3 100644 --- a/plugins/MirLua/src/mlua_metatable.h +++ b/plugins/MirLua/src/mlua_metatable.h @@ -106,8 +106,7 @@ private: auto it = fields.find(key);
if (it == fields.end())
{
- lua_pushnil(L);
- return 1;
+ return Index(L, obj);
}
MTField<T> *field = it->second;
@@ -136,7 +135,7 @@ private: lua_pushlightuserdata(L, field->GetValue<void*>(obj));
break;
default:
- return Index(L, obj);
+ lua_pushnil(L);
}
return 1;
|