Fixed the missing return value of -1 for HOOK_USEOBJON.

This commit is contained in:
NovaRain
2018-11-16 06:34:47 +08:00
parent 5426d043c1
commit 4da10e2fdb
+5 -1
View File
@@ -454,10 +454,12 @@ static void __declspec(naked) UseObjOnHook() {
popad;
cmp cRet, 1;
jl defaulthandler;
cmp rets[0], -1;
jz defaulthandler;
mov eax, rets[0];
jmp end
defaulthandler:
call protinst_use_item_on_
call protinst_use_item_on_;
end:
hookend;
retn;
@@ -476,6 +478,8 @@ static void __declspec(naked) UseObjOnHook_item_d_take_drug() {
popad;
cmp cRet, 1;
jl defaulthandler;
cmp rets[0], -1;
jz defaulthandler;
mov eax, rets[0];
jmp end
defaulthandler: