Skip to content

Commit e1617dc

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Merge 'misc-vs-fixes-extra' into HEAD
Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 527894d + 0e46d16 commit e1617dc

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

31143114
#if defined(_MSC_VER)
31153115

3116+
#ifdef _DEBUG
3117+
#include <crtdbg.h>
3118+
#endif
3119+
31163120
/*
31173121
* This routine sits between wmain() and "main" in git.exe.
31183122
* We receive UNICODE (wchar_t) values for argv and env.
@@ -3137,6 +3141,10 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
31373141
int maxlen;
31383142
int k, exit_status;
31393143

3144+
#ifdef _DEBUG
3145+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
3146+
#endif
3147+
31403148
#ifdef USE_MSVC_CRTDBG
31413149
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
31423150
#endif

0 commit comments

Comments
 (0)