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.
|
-- This will tell us if we already have the given function in our registry.
|
||||||
local function is_orig_hooked(obj, method)
|
local function is_orig_hooked(obj, method)
|
||||||
local orig_registry = _origs
|
local orig_registry = _origs
|
||||||
if obj and orig_registry[obj] and orig_registry[obj][method] then
|
if obj then
|
||||||
return true
|
if orig_registry[obj] and orig_registry[obj][method] then
|
||||||
elseif orig_registry[method] then
|
return true
|
||||||
|
end
|
||||||
|
elseif not obj and orig_registry[method] then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Add table
Reference in a new issue