summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.334
blob: 4f72bb24b1f21b40b28df7c5c1bfda08caf07040 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
To: vim_dev@googlegroups.com
Subject: Patch 7.4.334
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.4.334 (after 7.4.330)
Problem:    Unitialized variables, causing some problems.
Solution:   Initialize the variables. (Dominique Pelle)
Files:	    src/screen.c, src/window.c


*** ../vim-7.4.333/src/screen.c	2014-06-17 23:17:56.489376113 +0200
--- src/screen.c	2014-06-18 21:16:23.560368846 +0200
***************
*** 7363,7369 ****
      match_T	    *shl;	/* points to search_hl or a match */
      linenr_T	    lnum;
      colnr_T	    mincol;	/* minimal column for a match */
!     matchitem_T	    *cur;	/* to retrieve match postions if any */
  {
      linenr_T	l;
      colnr_T	matchcol;
--- 7363,7369 ----
      match_T	    *shl;	/* points to search_hl or a match */
      linenr_T	    lnum;
      colnr_T	    mincol;	/* minimal column for a match */
!     matchitem_T	    *cur;	/* to retrieve match positions if any */
  {
      linenr_T	l;
      colnr_T	matchcol;
***************
*** 7458,7466 ****
  	    }
  	}
  	else if (cur != NULL)
- 	{
  	    nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
! 	}
  	if (nmatched == 0)
  	{
  	    shl->lnum = 0;		/* no match found */
--- 7458,7466 ----
  	    }
  	}
  	else if (cur != NULL)
  	    nmatched = next_search_hl_pos(shl, lnum, &(cur->pos), matchcol);
! 	else
! 	    nmatched = 0;
  	if (nmatched == 0)
  	{
  	    shl->lnum = 0;		/* no match found */
*** ../vim-7.4.333/src/window.c	2014-06-17 17:48:21.784628008 +0200
--- src/window.c	2014-06-18 21:12:15.232359452 +0200
***************
*** 6809,6815 ****
      }
  
      /* Build new match. */
!     m = (matchitem_T *)alloc(sizeof(matchitem_T));
      m->id = id;
      m->priority = prio;
      m->pattern = pat == NULL ? NULL : vim_strsave(pat);
--- 6809,6815 ----
      }
  
      /* Build new match. */
!     m = (matchitem_T *)alloc_clear(sizeof(matchitem_T));
      m->id = id;
      m->priority = prio;
      m->pattern = pat == NULL ? NULL : vim_strsave(pat);
***************
*** 6835,6841 ****
  	    int		len = 1;
  	    list_T	*subl;
  	    listitem_T	*subli;
! 	    int		error;
  
  	    if (li == NULL)
  	    {
--- 6835,6841 ----
  	    int		len = 1;
  	    list_T	*subl;
  	    listitem_T	*subli;
! 	    int		error = FALSE;
  
  	    if (li == NULL)
  	    {
*** ../vim-7.4.333/src/version.c	2014-06-17 23:17:56.493376113 +0200
--- src/version.c	2014-06-18 21:14:16.516364040 +0200
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     334,
  /**/

-- 
You were lucky. We lived for three months in a brown paper bag in a 
septic tank. We used to have to get up at six o'clock in the morning, 
clean the bag, eat a crust of stale bread, go to work down mill for 
fourteen hours a day week in-week out. When we got home, our Dad
would thrash us to sleep with his belt!

 /// 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    ///