diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-27 11:50:08 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-27 12:47:44 +0800 |
commit | e3acf913db7eb27d53ea8f91b70fb2c723796be9 (patch) | |
tree | f62ed2f8b299b9886b1ec158477111525032c581 /src | |
parent | 807c6bb909806b5abc3e46a9677bedfdddf2a7f0 (diff) | |
download | rneovim-e3acf913db7eb27d53ea8f91b70fb2c723796be9.tar.gz rneovim-e3acf913db7eb27d53ea8f91b70fb2c723796be9.tar.bz2 rneovim-e3acf913db7eb27d53ea8f91b70fb2c723796be9.zip |
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 <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 10 |
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; } |