Skip to content

Commit

Permalink
fixup: only break if debugger attached
Browse files Browse the repository at this point in the history
not so trivial on linux
  • Loading branch information
ThisAMJ committed Sep 24, 2024
1 parent e3c0be2 commit 69c6a18
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Utils/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,9 @@ 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);
if (IsDebuggerPresent()) DebugBreak();
#ifdef SAR_DEV_BUILD
// handy for debugging
#ifdef _WIN32
DebugBreak();
#else
#ifndef _WIN32
raise(SIGTRAP);
#endif
#endif
Expand Down

0 comments on commit 69c6a18

Please sign in to comment.