From: Jude Melton-Houghton Date: Mon, 9 Jan 2023 20:00:49 +0000 (-0500) Subject: Always set globals in __newindex (#13131) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=d69cb4fb5d74753b06cc9c42e2a221e82506705a;p=minetest.git Always set globals in __newindex (#13131) --- diff --git a/builtin/common/strict.lua b/builtin/common/strict.lua index 6a385fa80..9bfa8d7a2 100644 --- a/builtin/common/strict.lua +++ b/builtin/common/strict.lua @@ -14,6 +14,7 @@ local declared = {} local warned = {} function meta:__newindex(name, value) + rawset(self, name, value) if declared[name] then return end @@ -25,7 +26,6 @@ function meta:__newindex(name, value) :format(name, desc)) warned[warn_key] = true end - rawset(self, name, value) declared[name] = true end