diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-08-08 10:36:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-08-08 10:36:31 +0000 |
commit | dc9cf9cd6d48ad9c6e25427f958401adc4a913ac (patch) | |
tree | bc7ca5b53d6f86d9281ebf8f415e7d8148d5f223 /src | |
parent | e37d50a5def1c0ff162392cd3f017059c458650c (diff) |
updated for version 7.2c-001v7.2c.001
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index cb548d30dc..5802a08940 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6231,8 +6231,11 @@ list_extend(l1, l2, bef) listitem_T *bef; { listitem_T *item; + int todo = l2->lv_len; - for (item = l2->lv_first; item != NULL; item = item->li_next) + /* We also quit the loop when we have inserted the original item count of + * the list, avoid a hang when we extend a list with itself. */ + for (item = l2->lv_first; item != NULL && --todo >= 0; item = item->li_next) if (list_insert_tv(l1, &item->li_tv, bef) == FAIL) return FAIL; return OK; diff --git a/src/version.c b/src/version.c index 21d7b143c2..c8565c447a 100644 --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1, +/**/ 0 }; |