Karsten Hopp d099d9
To: vim_dev@googlegroups.com
Karsten Hopp d099d9
Subject: Patch 7.3.325
Karsten Hopp d099d9
Fcc: outbox
Karsten Hopp d099d9
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d099d9
Mime-Version: 1.0
Karsten Hopp d099d9
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d099d9
Content-Transfer-Encoding: 8bit
Karsten Hopp d099d9
------------
Karsten Hopp d099d9
Karsten Hopp d099d9
Patch 7.3.325
Karsten Hopp d099d9
Problem:    A duplicated function argument gives an internal error.
Karsten Hopp d099d9
Solution:   Give a proper error message. (based on patch by Tyru)
Karsten Hopp d099d9
Files:	    src/eval.c
Karsten Hopp d099d9
Karsten Hopp d099d9
Karsten Hopp d099d9
*** ../vim-7.3.324/src/eval.c	2011-09-14 16:52:02.000000000 +0200
Karsten Hopp d099d9
--- src/eval.c	2011-09-30 16:32:20.000000000 +0200
Karsten Hopp d099d9
***************
Karsten Hopp d099d9
*** 20461,20466 ****
Karsten Hopp d099d9
--- 20461,20467 ----
Karsten Hopp d099d9
      exarg_T	*eap;
Karsten Hopp d099d9
  {
Karsten Hopp d099d9
      char_u	*theline;
Karsten Hopp d099d9
+     int		i;
Karsten Hopp d099d9
      int		j;
Karsten Hopp d099d9
      int		c;
Karsten Hopp d099d9
      int		saved_did_emsg;
Karsten Hopp d099d9
***************
Karsten Hopp d099d9
*** 20707,20712 ****
Karsten Hopp d099d9
--- 20708,20722 ----
Karsten Hopp d099d9
  	    arg = vim_strsave(arg);
Karsten Hopp d099d9
  	    if (arg == NULL)
Karsten Hopp d099d9
  		goto erret;
Karsten Hopp d099d9
+ 
Karsten Hopp d099d9
+ 	    /* Check for duplicate argument name. */
Karsten Hopp d099d9
+ 	    for (i = 0; i < newargs.ga_len; ++i)
Karsten Hopp d099d9
+ 		if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0)
Karsten Hopp d099d9
+ 		{
Karsten Hopp d099d9
+ 		    EMSG2(_("E853: Duplicate argument name: %s"), arg);
Karsten Hopp d099d9
+ 		    goto erret;
Karsten Hopp d099d9
+ 		}
Karsten Hopp d099d9
+ 
Karsten Hopp d099d9
  	    ((char_u **)(newargs.ga_data))[newargs.ga_len] = arg;
Karsten Hopp d099d9
  	    *p = c;
Karsten Hopp d099d9
  	    newargs.ga_len++;
Karsten Hopp d099d9
*** ../vim-7.3.324/src/version.c	2011-09-30 16:23:21.000000000 +0200
Karsten Hopp d099d9
--- src/version.c	2011-09-30 16:39:16.000000000 +0200
Karsten Hopp d099d9
***************
Karsten Hopp d099d9
*** 711,712 ****
Karsten Hopp d099d9
--- 711,714 ----
Karsten Hopp d099d9
  {   /* Add new patch number below this line */
Karsten Hopp d099d9
+ /**/
Karsten Hopp d099d9
+     325,
Karsten Hopp d099d9
  /**/
Karsten Hopp d099d9
Karsten Hopp d099d9
-- 
Karsten Hopp d099d9
hundred-and-one symptoms of being an internet addict:
Karsten Hopp d099d9
32. You don't know what sex three of your closest friends are, because they
Karsten Hopp d099d9
    have neutral nicknames and you never bothered to ask.
Karsten Hopp d099d9
Karsten Hopp d099d9
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d099d9
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d099d9
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d099d9
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///