diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-10-06 21:33:16 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-10-06 21:33:16 +0000 |
commit | 21bffa755081d938e5a229542268301362d4df69 (patch) | |
tree | 98fb2cbfaf4a34cc3ae0f5a624a2d909fa943267 | |
parent | c0a0ab5c5402177becfa08721fb88523b1ecc404 (diff) | |
download | vim-21bffa755081d938e5a229542268301362d4df69.zip |
updated for version 7.0-120
-rw-r--r-- | src/ops.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 0 deletions
@@ -770,6 +770,7 @@ get_expr_line() { char_u *expr_copy; char_u *rv; + static int nested = 0; if (expr_line == NULL) return NULL; @@ -780,7 +781,14 @@ get_expr_line() if (expr_copy == NULL) return NULL; + /* When we are invoked recursively limit the evaluation to 10 levels. + * Then return the string as-is. */ + if (nested >= 10) + return expr_copy; + + ++nested; rv = eval_to_string(expr_copy, NULL, TRUE); + --nested; vim_free(expr_copy); return rv; } diff --git a/src/version.c b/src/version.c index 31df51773..e3b6b73b9 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 120, +/**/ 119, /**/ 118, |