Skip to content

Commit

Permalink
Context.Wrap & Context.Call pass the args
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreLouisIssa committed Sep 15, 2023
1 parent d29a591 commit 233dcc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ModUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2134,8 +2134,9 @@ end )
ModUtil.Context.Call = ModUtil.Context(
function( info )
info.env = setmetatable( { }, { __index = info.penv } )
return table.unpack( info.args )
end,
function ( info )
function( info )
local thread = coroutine.running( )
local penv = threadEnvironments[ thread ]
threadEnvironments[ thread ] = info.env
Expand All @@ -2154,7 +2155,7 @@ ModUtil.Context.Wrap.Static = ModUtil.Context(
function( info )
info.env = setmetatable( { }, { __index = info.penv } )
end,
function ( info )
function( info )
return ModUtil.Wrap( info.arg, function( base, ... )
local thread = coroutine.running( )
local penv = threadEnvironments[ thread ]
Expand Down

0 comments on commit 233dcc8

Please sign in to comment.