diff --git a/src/Utils/Memory.cpp b/src/Utils/Memory.cpp index 28c70f26..fba110cb 100644 --- a/src/Utils/Memory.cpp +++ b/src/Utils/Memory.cpp @@ -149,11 +149,10 @@ uintptr_t Memory::Scan(const char *moduleName, const char *pattern, int offset) if (result == 0) { if (console) console->DevMsg("Failed to find pattern \"%s\" in module \"%s\"\n", pattern, moduleName); -#ifdef SAR_DEV_BUILD - // handy for debugging #ifdef _WIN32 - DebugBreak(); + if (IsDebuggerPresent()) DebugBreak(); #else +#ifdef SAR_DEV_BUILD raise(SIGTRAP); #endif #endif