]> granicus.if.org Git - vim/commitdiff
patch 8.2.4207: recursion test fails with MSVC v8.2.4207
authorBram Moolenaar <Bram@vim.org>
Mon, 24 Jan 2022 18:36:39 +0000 (18:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 24 Jan 2022 18:36:39 +0000 (18:36 +0000)
Problem:    Recursion test fails with MSVC.
Solution:   Use a smaller limit for MSVC.

src/eval.c
src/version.c

index d42e1f8266ac0aa0b845bd39cbae9587c3cbe007..9d4079d4558b7687f34e0c3531195ab38c3a7079 100644 (file)
@@ -3554,8 +3554,14 @@ eval7(
     }
 
     // Limit recursion to 1000 levels.  At least at 10000 we run out of stack
-    // and crash.
-    if (recurse == 1000)
+    // and crash.  With MSVC the stack is smaller.
+    if (recurse ==
+#ifdef _MSC_VER
+                   300
+#else
+                   1000
+#endif
+                   )
     {
        semsg(_(e_expression_too_recursive_str), *arg);
        return FAIL;
index 16a99ef92e4607781539459925b99f7f54232cbd..6703e8fafe959bd273f96eab42260844ba3b3635 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4207,
 /**/
     4206,
 /**/