mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-23 05:45:37 +08:00
fix
This commit is contained in:
parent
5f2f2e55f7
commit
d6fafd58fe
@ -207,10 +207,16 @@ bool NewHook(HookParam hp, LPCSTR name){
|
||||
return NewHook_1(hp,name);
|
||||
if(hp.jittype==JITTYPE::UNITY){
|
||||
auto spls=strSplit(hp.unityfunctioninfo,":");
|
||||
if(spls.size()!=5){
|
||||
ConsoleOutput("invalid");
|
||||
return false;
|
||||
}
|
||||
hp.address = tryfindmonoil2cpp(spls[0].c_str(),spls[1].c_str() ,spls[2].c_str(),spls[3].c_str(),std::stoi(spls[4]));
|
||||
|
||||
if(!hp.address)
|
||||
if(!hp.address){
|
||||
ConsoleOutput("not find");
|
||||
return false;
|
||||
}
|
||||
return NewHook_1(hp,name);
|
||||
}
|
||||
//下面的是手动插入
|
||||
|
@ -168,6 +168,7 @@ namespace
|
||||
if(hp.jittype==JITTYPE::UNITY){
|
||||
if(HCode[0]!=L'@')return {};
|
||||
HCode.erase(0,1);
|
||||
HCode=HCode.substr(0,HCode.size()-wcslen(L":JIT:UNITY"));
|
||||
hp.argidx=hp.offset;
|
||||
hp.offset=0;
|
||||
hp.address=0;
|
||||
|
Loading…
Reference in New Issue
Block a user