Skip to content

Commit

Permalink
Add back "global" table clear in setSurgeFunctionEnvironment()
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoun committed Jul 30, 2024
1 parent 17a6cd8 commit 3c47264
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/common/LuaSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ bool Surge::LuaSupport::setSurgeFunctionEnvironment(lua_State *L)
lua_pop(L, 1);

// clear global table
/*
lua_getglobal(L, "global");
lua_pushnil(L);
while (lua_next(L, -2))
Expand All @@ -176,7 +175,6 @@ bool Surge::LuaSupport::setSurgeFunctionEnvironment(lua_State *L)
lua_settable(L, -4); // clear the key
}
lua_pop(L, 1);
*/

// and now we are back to f>t so we can setfenv it
lua_setfenv(L, -2);
Expand Down

0 comments on commit 3c47264

Please sign in to comment.