]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.113
- typo
[packages/vim.git] / 7.1.113
1 To: vim-dev@vim.org
2 Subject: patch 7.1.113
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.113
11 Problem:    Using map() to go over an empty list causes memory to be freed
12             twice. (A.Politz)
13 Solution:   Don't clear the typeval in restore_vimvar().
14 Files:      src/eval.c
15
16
17 *** ../vim-7.1.112/src/eval.c   Sun Sep 16 14:20:18 2007
18 --- src/eval.c  Sun Sep 16 19:24:49 2007
19 ***************
20 *** 1318,1324 ****
21   {
22       hashitem_T        *hi;
23   
24 -     clear_tv(&vimvars[idx].vv_tv);
25       vimvars[idx].vv_tv = *save_tv;
26       if (vimvars[idx].vv_type == VAR_UNKNOWN)
27       {
28 --- 1318,1323 ----
29 ***************
30 *** 1362,1368 ****
31   
32       if (p_verbose == 0)
33         --emsg_off;
34 -     vimvars[VV_VAL].vv_str = NULL;
35       restore_vimvar(VV_VAL, &save_val);
36   
37       return list;
38 --- 1361,1366 ----
39 ***************
40 *** 9387,9401 ****
41   {
42       typval_T  rettv;
43       char_u    *s;
44   
45       copy_tv(tv, &vimvars[VV_VAL].vv_tv);
46       s = expr;
47       if (eval1(&s, &rettv, TRUE) == FAIL)
48 !       return FAIL;
49       if (*s != NUL)  /* check for trailing chars after expr */
50       {
51         EMSG2(_(e_invexpr2), s);
52 !       return FAIL;
53       }
54       if (map)
55       {
56 --- 9386,9401 ----
57   {
58       typval_T  rettv;
59       char_u    *s;
60 +     int               retval = FAIL;
61   
62       copy_tv(tv, &vimvars[VV_VAL].vv_tv);
63       s = expr;
64       if (eval1(&s, &rettv, TRUE) == FAIL)
65 !       goto theend;
66       if (*s != NUL)  /* check for trailing chars after expr */
67       {
68         EMSG2(_(e_invexpr2), s);
69 !       goto theend;
70       }
71       if (map)
72       {
73 ***************
74 *** 9414,9423 ****
75         /* On type error, nothing has been removed; return FAIL to stop the
76          * loop.  The error message was given by get_tv_number_chk(). */
77         if (error)
78 !           return FAIL;
79       }
80       clear_tv(&vimvars[VV_VAL].vv_tv);
81 !     return OK;
82   }
83   
84   /*
85 --- 9414,9425 ----
86         /* On type error, nothing has been removed; return FAIL to stop the
87          * loop.  The error message was given by get_tv_number_chk(). */
88         if (error)
89 !           goto theend;
90       }
91 +     retval = OK;
92 + theend:
93       clear_tv(&vimvars[VV_VAL].vv_tv);
94 !     return retval;
95   }
96   
97   /*
98 *** ../vim-7.1.112/src/version.c        Sun Sep 16 14:20:18 2007
99 --- src/version.c       Mon Sep 17 21:33:52 2007
100 ***************
101 *** 668,669 ****
102 --- 668,671 ----
103   {   /* Add new patch number below this line */
104 + /**/
105 +     113,
106   /**/
107
108 -- 
109 Mental Floss prevents moral decay!
110
111  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
112 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
113 \\\        download, build and distribute -- http://www.A-A-P.org        ///
114  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.471573 seconds and 3 git commands to generate.