Skip to content

Commit

Permalink
修复带有字符串形式事件的模式加载就爆炸
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Oct 7, 2023
1 parent c05a8c4 commit 999ed0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/gamefunc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ function updateWidgetVisible(widgetList)
end

local sandBoxEnv={
mechLib=mechLib,
math=math,
string=string,
table=table,
Expand All @@ -221,9 +220,10 @@ local sandBoxEnv={
type=type,
pcall=pcall,xpcall=xpcall,
rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal,
setfenv=setfenv,setmetatable=setmetatable,
setmetatable=setmetatable,
}
function setSafeEnv(func)
sandBoxEnv.mechLib=mechLib
setfenv(func,TABLE.copy(sandBoxEnv))
end

Expand Down

0 comments on commit 999ed0f

Please sign in to comment.