summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.325
blob: 80ebc6deb27a3b96812e7a4ac6c2e60e87b73648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
To: vim_dev@googlegroups.com
Subject: Patch 7.3.325
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

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 -- Bram@Moolenaar.net -- 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    ///