mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:8.2.4207: recursion test fails with MSVC
Problem: Recursion test fails with MSVC.
Solution: Use a smaller limit for MSVC.
50e0525445
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2926,8 +2926,14 @@ static int eval7(char **arg, typval_T *rettv, int evaluate, int want_string)
|
|||||||
end_leader = *arg;
|
end_leader = *arg;
|
||||||
|
|
||||||
// Limit recursion to 1000 levels. At least at 10000 we run out of stack
|
// Limit recursion to 1000 levels. At least at 10000 we run out of stack
|
||||||
// and crash.
|
// and crash. With MSVC the stack is smaller.
|
||||||
if (recurse == 1000) {
|
if (recurse ==
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
300
|
||||||
|
#else
|
||||||
|
1000
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
semsg(_(e_expression_too_recursive_str), *arg);
|
semsg(_(e_expression_too_recursive_str), *arg);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user