mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 03:33:04 +08:00
[saco] Correct SetIPLs to spell out the last two patches; retail inlines the protect/memcpy/restore there instead of calling _patch, only the two spare frame slots and one materialised address differ now
This commit is contained in:
+11
-2
@@ -49,8 +49,17 @@ void SetIPLs(int iIPLs, int iGtaVersion)
|
||||
patch(0x156495A,bIPLs);
|
||||
patch(0x156115C,bIPLs);
|
||||
}
|
||||
patch(0x40619B,bIPLs);
|
||||
patch(0x405C3D,bIPLs);
|
||||
|
||||
// the last two are _patch spelled out, not a call to it
|
||||
DWORD dwProtect[2];
|
||||
|
||||
VirtualProtect((PVOID)0x40619B,sizeof(bIPLs),PAGE_EXECUTE_READWRITE,&dwProtect[0]);
|
||||
memcpy((PVOID)0x40619B,bIPLs,sizeof(bIPLs));
|
||||
VirtualProtect((PVOID)0x40619B,sizeof(bIPLs),dwProtect[0],&dwProtect[1]);
|
||||
|
||||
VirtualProtect((PVOID)0x405C3D,sizeof(bIPLs),PAGE_EXECUTE_READWRITE,&dwProtect[0]);
|
||||
memcpy((PVOID)0x405C3D,bIPLs,sizeof(bIPLs));
|
||||
VirtualProtect((PVOID)0x405C3D,sizeof(bIPLs),dwProtect[0],&dwProtect[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user