aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 42ea8bd79b..0e4dbeaea6 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2926,8 +2926,14 @@ static int eval7(char **arg, typval_T *rettv, int evaluate, int want_string)
end_leader = *arg;
// 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;
}