Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.181
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.181
Problem:    Accessing uninitialized memory in Farsi mode. (Dominuque Pelle)
Solution:   Only invoke lrF_sub() when there is something to do.
Files:	    src/ex_cmds.c


*** ../vim-7.1.180/src/ex_cmds.c	Sun Dec  9 19:37:37 2007
--- src/ex_cmds.c	Mon Dec 31 17:29:25 2007
***************
*** 4212,4222 ****
  	sub_nlines = 0;
      }
  
- #ifdef FEAT_FKMAP	/* reverse the flow of the Farsi characters */
-     if (p_altkeymap && curwin->w_p_rl)
- 	lrF_sub(cmd);
- #endif
- 
      if (eap->cmdidx == CMD_tilde)
  	which_pat = RE_LAST;	/* use last used regexp */
      else
--- 4212,4217 ----
***************
*** 4252,4257 ****
--- 4247,4256 ----
  	}
  	else		/* find the end of the regexp */
  	{
+ #ifdef FEAT_FKMAP	/* reverse the flow of the Farsi characters */
+ 	    if (p_altkeymap && curwin->w_p_rl)
+ 		lrF_sub(cmd);
+ #endif
  	    which_pat = RE_LAST;	    /* use last used regexp */
  	    delimiter = *cmd++;		    /* remember delimiter character */
  	    pat = cmd;			    /* remember start of search pat */
*** ../vim-7.1.180/src/version.c	Tue Jan  1 17:37:01 2008
--- src/version.c	Wed Jan  2 13:57:31 2008
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     181,
  /**/

-- 
Yah, well, we had to carve our electrons out of driftwood we'd
find.  In the winter.  Uphill.  Both ways.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///