]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0462: MS-Windows: workaround for assert error on GUI v9.2.0462
authorK.Takata <kentkt@csc.jp>
Sun, 10 May 2026 16:34:01 +0000 (16:34 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 10 May 2026 16:34:01 +0000 (16:34 +0000)
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 <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/os_win32.c
src/version.c

index ab12d5a051be8d3595c05463a530879404289a98..31fa169a5ad47225c63683d5082211847fcb9d29 100644 (file)
@@ -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;
 }
index 6b5b0e7e1187706009915920ce38ca7eb49b16de..fd79c4354ce9d60364da166730cc5bb82121b6bf 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    462,
 /**/
     461,
 /**/