summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-24 18:36:39 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-24 18:36:39 +0000
commit50e05254450954f04183efc7bc871527a67868b8 (patch)
treec79ee75b664a6216a391e14eaca0ddb9d844d901 /src/eval.c
parentfe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d (diff)
patch 8.2.4207: recursion test fails with MSVCv8.2.4207
Problem: Recursion test fails with MSVC. Solution: Use a smaller limit for MSVC.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index d42e1f8266..9d4079d455 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;