From e3acf913db7eb27d53ea8f91b70fb2c723796be9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Oct 2022 11:50:08 +0800 Subject: [PATCH] vim-patch:8.2.4207: recursion test fails with MSVC Problem: Recursion test fails with MSVC. Solution: Use a smaller limit for MSVC. https://github.com/vim/vim/commit/50e05254450954f04183efc7bc871527a67868b8 Co-authored-by: Bram Moolenaar --- src/nvim/eval.c | 10 ++++++++-- 1 file 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; }