diff options
Diffstat (limited to 'src/sw_protect.c')
-rw-r--r-- | src/sw_protect.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sw_protect.c b/src/sw_protect.c index 6b9ce40..d144e97 100644 --- a/src/sw_protect.c +++ b/src/sw_protect.c @@ -14,7 +14,8 @@ Sys_MakeCodeWriteable ================ */ -void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length) { +void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length) +{ #ifdef _WIN32 DWORD flOldProtect; @@ -25,11 +26,11 @@ void Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length) { unsigned long addr; int psize = getpagesize(); - addr = (startaddr & ~(psize-1)) - psize; + addr = (startaddr & ~(psize - 1)) - psize; r = mprotect((char*)addr, length + startaddr - addr + psize, 7); if (r < 0) - Com_Error( ERR_FATAL, "Protection change failed\n"); + Com_Error(ERR_FATAL, "Protection change failed\n"); #endif } |