diff --git a/apps/openmw_test_suite/lua/test_ui_content.cpp b/apps/openmw_test_suite/lua/test_ui_content.cpp index bf33bbd697..01a5cdd370 100644 --- a/apps/openmw_test_suite/lua/test_ui_content.cpp +++ b/apps/openmw_test_suite/lua/test_ui_content.cpp @@ -42,7 +42,7 @@ namespace mLuaState.sol()["M"] = makeContent(makeTable()).getMetatable(); std::string testScript = R"( assert(not pcall(function() setmetatable(makeContent{}, {}) end), 'Metatable is not protected') - assert(getmetatable(makeContent{}) ~= M, 'Metatable is not protected') + assert(getmetatable(makeContent{}) == false, 'Metatable is not protected') )"; EXPECT_NO_THROW(mLuaState.sol().safe_script(testScript)); } diff --git a/components/lua_ui/content.lua b/components/lua_ui/content.lua index cd63efc7ca..fbd39d5f68 100644 --- a/components/lua_ui/content.lua +++ b/components/lua_ui/content.lua @@ -135,6 +135,6 @@ M.__pairs = function(self) return next, self, 1 end M.__ipairs = M.__pairs -M.__metatable = {} +M.__metatable = false return M