diff options
| author | ruki <[email protected]> | 2026-01-09 00:52:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-09 00:52:08 +0800 |
| commit | 25f4ca74a65bc3a0cdc8ab26c9be6583c1312cae (patch) | |
| tree | 77f3b04c8b59f7a766dea8e332df8a65c9882940 /xmake/core | |
| parent | f14ff9651eb38e519749eb9727d15c0a6199adac (diff) | |
improve getfenvenv
Diffstat (limited to 'xmake/core')
| -rw-r--r-- | xmake/core/base/compat/env.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xmake/core/base/compat/env.lua b/xmake/core/base/compat/env.lua index ec21c271b..2e9150cf5 100644 --- a/xmake/core/base/compat/env.lua +++ b/xmake/core/base/compat/env.lua @@ -80,8 +80,7 @@ else -- >= Lua 5.2 -- 5.1 style `getfenv` implemented in 5.2 function env.getfenv(f) if f == 0 then return _G end -- simulated behavior - f = f or 1 - local f = envhelper(f, 'getfenv') + local f = envhelper(f or 1, 'getfenv') local up, val = envlookup(f) if not up then return _G end -- simulated behavior [**] return val |
