Skip to content

Commit 804549a

Browse files
author
Git for Windows Build Agent
committed
Merge 'misc-vs-fixes-extra' into HEAD
Signed-off-by: Johannes Schindelin <[email protected]>
2 parents ce4b72a + 9786e0a commit 804549a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compat/mingw.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,6 +3070,10 @@ static void maybe_redirect_std_handles(void)
30703070

30713071
#if defined(_MSC_VER)
30723072

3073+
#ifdef _DEBUG
3074+
#include <crtdbg.h>
3075+
#endif
3076+
30733077
/*
30743078
* This routine sits between wmain() and "main" in git.exe.
30753079
* We receive UNICODE (wchar_t) values for argv and env.
@@ -3094,6 +3098,10 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
30943098
int maxlen;
30953099
int k, exit_status;
30963100

3101+
#ifdef _DEBUG
3102+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
3103+
#endif
3104+
30973105
#ifdef USE_MSVC_CRTDBG
30983106
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
30993107
#endif

0 commit comments

Comments
 (0)