Skip to content

Commit

Permalink
Set scope directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Dec 12, 2024
1 parent 1c0896e commit 65440ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lua/entities/gmod_wire_expression2/base/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,13 @@ local CompileVisitors = {
self.scope.data.ops = self.scope.data.ops + 5

return function(state) ---@param state RuntimeContext
local depth = state.ScopeID
local scope, scope_id = state.Scope, state.ScopeID
state:PushScope()
local ok, err = pcall(try_block, state)
while state.ScopeID > depth do -- Dump all scopes that may have been created in between
if ok then
state:PopScope()
end
if not ok then
else
state.Scope, state.ScopeID = scope, scope_id -- Skip back any scopes that may have been created in try_block
local catchable, msg = E2Lib.unpackException(err)
if catchable then
state:PushScope()
Expand Down

0 comments on commit 65440ca

Please sign in to comment.