Skip to content

Commit abc9c85

Browse files
committed
Merge 'misc-vs-fixes-extra' into HEAD
Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 59752e7 + 4a4e2e8 commit abc9c85

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
@@ -3011,6 +3011,10 @@ static char *wcstoutfdup_startup(char *buffer, const wchar_t *wcs, size_t len)
30113011

30123012
#if defined(_MSC_VER)
30133013

3014+
#ifdef _DEBUG
3015+
#include <crtdbg.h>
3016+
#endif
3017+
30143018
/*
30153019
* This routine sits between wmain() and "main" in git.exe.
30163020
* We receive UNICODE (wchar_t) values for argv and env.
@@ -3035,6 +3039,10 @@ int msc_startup(int argc, wchar_t **w_argv, wchar_t **w_env)
30353039
int maxlen;
30363040
int k, x;
30373041

3042+
#ifdef _DEBUG
3043+
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
3044+
#endif
3045+
30383046
#ifdef USE_MSVC_CRTDBG
30393047
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
30403048
#endif

0 commit comments

Comments
 (0)