• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision58059676e24a6fbbc686faf84c612cfa8c25485d (tree)
l'heure2006-10-15 22:09:12
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.0-134

Change Summary

Modification

diff -r 7d29124f77f5 -r 58059676e24a src/eval.c
--- a/src/eval.c Sat Oct 14 12:32:39 2006 +0000
+++ b/src/eval.c Sun Oct 15 13:09:12 2006 +0000
@@ -5520,19 +5520,27 @@
55205520 {
55215521 char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
55225522 char_u *s1, *s2;
5523-
5524- if (tv1->v_type != tv2->v_type)
5523+ static int recursive = 0; /* cach recursive loops */
5524+ int r;
5525+
5526+ /* Catch lists and dicts that have an endless loop by limiting
5527+ * recursiveness to 1000. */
5528+ if (tv1->v_type != tv2->v_type || recursive >= 1000)
55255529 return FALSE;
55265530
55275531 switch (tv1->v_type)
55285532 {
55295533 case VAR_LIST:
5530- /* recursive! */
5531- return list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
5534+ ++recursive;
5535+ r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
5536+ --recursive;
5537+ return r;
55325538
55335539 case VAR_DICT:
5534- /* recursive! */
5535- return dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
5540+ ++recursive;
5541+ r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
5542+ --recursive;
5543+ return r;
55365544
55375545 case VAR_FUNC:
55385546 return (tv1->vval.v_string != NULL
diff -r 7d29124f77f5 -r 58059676e24a src/version.c
--- a/src/version.c Sat Oct 14 12:32:39 2006 +0000
+++ b/src/version.c Sun Oct 15 13:09:12 2006 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 134,
671+/**/
670672 133,
671673 /**/
672674 132,
Afficher sur ancien navigateur de dépôt.