Patch 7.3.325
Problem:    A duplicated function argument gives an internal error.
Solution:   Give a proper error message. (based on patch by Tyru)
Files:      src/eval.c


*** ../vim-7.3.324/src/eval.c   2011-09-14 16:52:02.000000000 +0200
--- src/eval.c  2011-09-30 16:32:20.000000000 +0200
***************
*** 20461,20466 ****
--- 20461,20467 ----
      exarg_T   *eap;
  {
      char_u    *theline;
+     int               i;
      int               j;
      int               c;
      int               saved_did_emsg;
***************
*** 20707,20712 ****
--- 20708,20722 ----
            arg = vim_strsave(arg);
            if (arg == NULL)
                goto erret;
+ 
+           /* Check for duplicate argument name. */
+           for (i = 0; i < newargs.ga_len; ++i)
+               if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0)
+               {
+                   EMSG2(_("E853: Duplicate argument name: %s"), arg);
+                   goto erret;
+               }
+ 
            ((char_u **)(newargs.ga_data))[newargs.ga_len] = arg;
            *p = c;
            newargs.ga_len++;
*** ../vim-7.3.324/src/version.c        2011-09-30 16:23:21.000000000 +0200
--- src/version.c       2011-09-30 16:39:16.000000000 +0200
***************
*** 711,712 ****
--- 711,714 ----
  {   /* Add new patch number below this line */
+ /**/
+     325,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
32. You don't know what sex three of your closest friends are, because they
    have neutral nicknames and you never bothered to ask.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui