diff --git a/x64_dbg_dbg/memory.cpp b/x64_dbg_dbg/memory.cpp index 2302ba26..0a1d49dc 100644 --- a/x64_dbg_dbg/memory.cpp +++ b/x64_dbg_dbg/memory.cpp @@ -331,7 +331,7 @@ bool MemIsCodePage(uint Address, bool Refresh) if(!MemGetPageInfo(Address, &pageInfo, Refresh)) return false; - return (pageInfo.mbi.Protect & PAGE_EXECUTE) == PAGE_EXECUTE; + return (pageInfo.mbi.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY)) != 0; } uint MemAllocRemote(uint Address, uint Size, DWORD Type, DWORD Protect) @@ -472,4 +472,4 @@ bool MemPageRightsFromString(DWORD* Protect, const char* Rights) *Protect |= PAGE_WRITECOPY; return (*Protect != 0); -} \ No newline at end of file +}