From f51ace3db85150b57305ab140b536192a103a7c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 22 Sep 2022 17:26:59 +0300 Subject: [PATCH] mdbx-windows: always call debugger if it present when assertion check failed. --- src/osal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osal.c b/src/osal.c index ec26357c..b8b8cf54 100644 --- a/src/osal.c +++ b/src/osal.c @@ -242,14 +242,14 @@ __cold void mdbx_assert_fail(const MDBX_env *env, const char *msg, if (num < 1 || !message) message = ""; OutputDebugStringA(message); - if (IsDebuggerPresent()) - DebugBreak(); #else __assert_fail(msg, "mdbx", line, func); #endif } #if defined(_WIN32) || defined(_WIN64) + if (IsDebuggerPresent()) + DebugBreak(); FatalExit(ERROR_UNHANDLED_ERROR); #else abort();