Fixed a conditional flaw in is_orig_hooked
This commit is contained in:
parent
8af6a1b91c
commit
ce468164aa
1 changed files with 5 additions and 3 deletions
|
@ -44,9 +44,11 @@ local _origs = {}
|
|||
-- This will tell us if we already have the given function in our registry.
|
||||
local function is_orig_hooked(obj, method)
|
||||
local orig_registry = _origs
|
||||
if obj and orig_registry[obj] and orig_registry[obj][method] then
|
||||
return true
|
||||
elseif orig_registry[method] then
|
||||
if obj then
|
||||
if orig_registry[obj] and orig_registry[obj][method] then
|
||||
return true
|
||||
end
|
||||
elseif not obj and orig_registry[method] then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
|
Loading…
Add table
Reference in a new issue