Skip to content

Commit

Permalink
Another hook bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 committed Dec 15, 2023
1 parent 493158b commit 70b577d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/starfall/sflib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ do
SF.HookTable = {
__index = {
add = function(self, index, func)
if not (self.hooks[index] or self.hookstoadd[index]) then
if not (self.hooks[index] or self.hookstoadd[index]) or self.hookstoremove[index] then
if self.n>=128 then SF.Throw("Max hooks limit reached", 3) end
self.n = self.n + 1
end
Expand Down Expand Up @@ -776,7 +776,7 @@ do
self.hookstoadd[k] = nil
end
self.pairs = self.cleanPairs
return self:pairs()
return pairs(self.hooks)
end,
cleanPairs = function(self)
return pairs(self.hooks)
Expand Down

0 comments on commit 70b577d

Please sign in to comment.