From b53c7b03aa5276f0d3e453740247f6ca4a600dce Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 15 Jan 2025 09:55:28 +0100 Subject: util.bitcompat: Avoid potential noise from global metatable If this module is require'd from a plugin on a Lua version without the global bit32 library, it may trip a warning about accessing globals. --- util/bitcompat.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/bitcompat.lua') diff --git a/util/bitcompat.lua b/util/bitcompat.lua index 43fd0f6e..537914a7 100644 --- a/util/bitcompat.lua +++ b/util/bitcompat.lua @@ -3,7 +3,7 @@ -- First try the bit32 lib -- Lua 5.3 has it with compat enabled -- Lua 5.2 has it by default -if _G.bit32 then +if rawget(_G, "bit32") then return _G.bit32; end -- cgit v1.2.3