From d5914f2a9e22f5ad60eaa9263f3357ed1680058a Mon Sep 17 00:00:00 2001 From: David Given Date: Sat, 16 Jul 2022 11:54:13 +0200 Subject: [PATCH] Better Lua version compatibility. --- first/ackbuilder.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/first/ackbuilder.lua b/first/ackbuilder.lua index 4f54df92d..b2b41cf62 100644 --- a/first/ackbuilder.lua +++ b/first/ackbuilder.lua @@ -22,7 +22,7 @@ local loadtarget -- Compatibility polyfill for load local function loadf(text, source, mode, env) - if rawget(_G, "loadstring") then + if rawget(_G, "loadstring") and rawget(_G, "setfenv") then local chunk, e = loadstring(text, "@"..source) if chunk then setfenv(chunk, env)