Permalink
Browse files

dvander foxes

  • Loading branch information...
Headline committed Jul 31, 2018
1 parent 5374982 commit 96695e209ed1cd2f071eafbdcbbf41f211524b35
Showing with 3 additions and 7 deletions.
  1. +3 −7 core/sourcehook/sh_memory.h
@@ -248,7 +248,7 @@ namespace SourceHook
*/
namespace
{
bool ModuleInMemory(char *addr, size_t len)
static inline bool ModuleInMemory(char *addr, size_t len)
{
#if SH_SYS == SH_SYS_LINUX
// On linux, first check /proc/self/maps
@@ -322,10 +322,8 @@ namespace SourceHook
prevHandler = signal(SIGSEGV, BadReadHandler);

volatile const char *p = reinterpret_cast<const char*>(addr);
char dummy;

for (size_t i = 0; i < len; i++)
dummy = p[i];
p[i];

g_BadReadCalled = false;

@@ -346,10 +344,8 @@ namespace SourceHook
return false;

volatile const char *p = reinterpret_cast<const char *>(addr);
char dummy;

for (size_t i = 0; i < len; i++)
dummy = p[i];
p[i];

g_BadReadCalled = false;

0 comments on commit 96695e2

Please sign in to comment.