Karsten Hopp 9b43b3
To: vim-dev@vim.org
Karsten Hopp 9b43b3
Subject: Patch 7.1.287
Karsten Hopp 9b43b3
Fcc: outbox
Karsten Hopp 9b43b3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9b43b3
Mime-Version: 1.0
Karsten Hopp 9b43b3
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 9b43b3
Content-Transfer-Encoding: 8bit
Karsten Hopp 9b43b3
------------
Karsten Hopp 9b43b3
Karsten Hopp 9b43b3
Patch 7.1.287
Karsten Hopp 9b43b3
Problem:    Crash when reversing a list after using it. (Andy Wokula)
Karsten Hopp 9b43b3
Solution:   Update the pointer to the last used element. (Dominique Pelle)
Karsten Hopp 9b43b3
Files:	    src/eval.c
Karsten Hopp 9b43b3
Karsten Hopp 9b43b3
Karsten Hopp 9b43b3
*** ../vim-7.1.286/src/eval.c	Thu Mar 20 13:22:47 2008
Karsten Hopp 9b43b3
--- src/eval.c	Tue Apr  1 12:36:41 2008
Karsten Hopp 9b43b3
***************
Karsten Hopp 9b43b3
*** 13954,13959 ****
Karsten Hopp 9b43b3
--- 13954,13960 ----
Karsten Hopp 9b43b3
  	rettv->vval.v_list = l;
Karsten Hopp 9b43b3
  	rettv->v_type = VAR_LIST;
Karsten Hopp 9b43b3
  	++l->lv_refcount;
Karsten Hopp 9b43b3
+ 	l->lv_idx = l->lv_len - l->lv_idx - 1;
Karsten Hopp 9b43b3
      }
Karsten Hopp 9b43b3
  }
Karsten Hopp 9b43b3
  
Karsten Hopp 9b43b3
***************
Karsten Hopp 9b43b3
*** 15202,15208 ****
Karsten Hopp 9b43b3
  	    if (!item_compare_func_err)
Karsten Hopp 9b43b3
  	    {
Karsten Hopp 9b43b3
  		/* Clear the List and append the items in the sorted order. */
Karsten Hopp 9b43b3
! 		l->lv_first = l->lv_last = NULL;
Karsten Hopp 9b43b3
  		l->lv_len = 0;
Karsten Hopp 9b43b3
  		for (i = 0; i < len; ++i)
Karsten Hopp 9b43b3
  		    list_append(l, ptrs[i]);
Karsten Hopp 9b43b3
--- 15203,15209 ----
Karsten Hopp 9b43b3
  	    if (!item_compare_func_err)
Karsten Hopp 9b43b3
  	    {
Karsten Hopp 9b43b3
  		/* Clear the List and append the items in the sorted order. */
Karsten Hopp 9b43b3
! 		l->lv_first = l->lv_last = l->lv_idx_item = NULL;
Karsten Hopp 9b43b3
  		l->lv_len = 0;
Karsten Hopp 9b43b3
  		for (i = 0; i < len; ++i)
Karsten Hopp 9b43b3
  		    list_append(l, ptrs[i]);
Karsten Hopp 9b43b3
*** ../vim-7.1.286/src/version.c	Tue Apr  1 12:05:49 2008
Karsten Hopp 9b43b3
--- src/version.c	Tue Apr  1 13:09:10 2008
Karsten Hopp 9b43b3
***************
Karsten Hopp 9b43b3
*** 668,669 ****
Karsten Hopp 9b43b3
--- 668,671 ----
Karsten Hopp 9b43b3
  {   /* Add new patch number below this line */
Karsten Hopp 9b43b3
+ /**/
Karsten Hopp 9b43b3
+     287,
Karsten Hopp 9b43b3
  /**/
Karsten Hopp 9b43b3
Karsten Hopp 9b43b3
-- 
Karsten Hopp 9b43b3
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 9b43b3
203. You're an active member of more than 20 newsgroups.
Karsten Hopp 9b43b3
Karsten Hopp 9b43b3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9b43b3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9b43b3
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 9b43b3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///