From: K.Takata Date: Sun, 10 May 2026 16:34:01 +0000 (+0000) Subject: patch 9.2.0462: MS-Windows: workaround for assert error on GUI X-Git-Tag: v9.2.0462^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a1ac7ced28179a5b39a7135b5c242ec8bc06797;p=thirdparty%2Fvim.git patch 9.2.0462: MS-Windows: workaround for assert error on GUI Problem: When Vim is built with debug mode, gvim causes an assertion error and stops working when running on Visual Studio Debugger. Solution: Stop calling _set_fmode() if not needed (Ken Takata). closes: #20181 Signed-off-by: K.Takata Signed-off-by: Christian Brabandt --- diff --git a/src/os_win32.c b/src/os_win32.c index ab12d5a051..31fa169a5a 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -8100,7 +8100,8 @@ mch_fopen(const char *name, const char *mode) vim_free(wm); #if defined(DEBUG) && _MSC_VER >= 1400 - _set_fmode(oldMode); + if (oldMode != 0) + _set_fmode(oldMode); #endif return f; } diff --git a/src/version.c b/src/version.c index 6b5b0e7e11..fd79c4354c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 462, /**/ 461, /**/