mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-04 20:42:02 +08:00
Avoid hook called with unsupported arguments
This commit is contained in:
parent
897c70b74a
commit
56a9cf7e53
@ -97,9 +97,9 @@ struct HookHandler {
|
|||||||
hook(dlsym<Sym>(), reinterpret_cast<void *>(hooker.replace_))));
|
hook(dlsym<Sym>(), reinterpret_cast<void *>(hooker.replace_))));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... T>
|
template <typename T1, typename T2, typename... U>
|
||||||
[[gnu::always_inline]] bool hook(T &...args) const {
|
[[gnu::always_inline]] bool hook(T1 &arg1, T2 &arg2, U &...args) const {
|
||||||
return (hook(args) || ...);
|
return ((hook(arg1) || hook(arg2)) || ... || hook(args));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user