1.1 --- a/cssdm_utils.cpp Tue Nov 13 22:29:35 2007 +0000
1.2 +++ b/cssdm_utils.cpp Tue Nov 13 22:31:20 2007 +0000
1.3 @@ -255,9 +255,10 @@
1.4
1.5 void DM_ApplyPatch(void *address, int offset, const dmpatch_t *patch, dmpatch_t *restore)
1.6 {
1.7 - DM_ProtectMemory(address, 20, PAGE_EXECUTE_READWRITE);
1.8 + unsigned char *addr = (unsigned char *)address + offset;
1.9
1.10 - unsigned char *addr = (unsigned char *)address + offset;
1.11 + DM_ProtectMemory(addr, 20, PAGE_EXECUTE_READWRITE);
1.12 +
1.13 if (restore)
1.14 {
1.15 for (size_t i=0; i<patch->bytes; i++)