aboutsummaryrefslogtreecommitdiff
path: root/builtin/common
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2023-01-09 15:00:49 -0500
committerGitHub <noreply@github.com>2023-01-09 15:00:49 -0500
commitd69cb4fb5d74753b06cc9c42e2a221e82506705a (patch)
treea8747ed01709489a1949d5e525ab448c954a8ee8 /builtin/common
parentd0b6f217ae4743ee0caa44b90c53e0e8ae2d1e31 (diff)
downloadminetest-d69cb4fb5d74753b06cc9c42e2a221e82506705a.tar.xz
Always set globals in __newindex (#13131)
Diffstat (limited to 'builtin/common')
-rw-r--r--builtin/common/strict.lua2
1 files changed, 1 insertions, 1 deletions
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