Skip to content

Commit f7357f8

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 37f5583 + d016aa1 commit f7357f8

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
@@ -3063,6 +3063,10 @@ static void maybe_redirect_std_handles(void)
30633063

30643064
#if defined(_MSC_VER)
30653065

3066+
#ifdef _DEBUG
3067+
#include <crtdbg.h>
3068+
#endif
3069+
30663070
/*
30673071
* This routine sits between wmain() and "main" in git.exe.
30683072
* We receive UNICODE (wchar_t) values for argv and env.
@@ -3087,6 +3091,10 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
30873091
int maxlen;
30883092
int k, exit_status;
30893093

3094+
#ifdef _DEBUG
3095+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
3096+
#endif
3097+
30903098
#ifdef USE_MSVC_CRTDBG
30913099
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
30923100
#endif

0 commit comments

Comments
 (0)