0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4207: recursion test fails with MSVC

Problem:    Recursion test fails with MSVC.
Solution:   Use a smaller limit for MSVC.
This commit is contained in:
Bram Moolenaar
2022-01-24 18:36:39 +00:00
parent fe6fb267e6
commit 50e0525445
2 changed files with 10 additions and 2 deletions

View File

@@ -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;