]> git.pld-linux.org Git - packages/vim.git/blame - 7.3.428
- up to 7.3.600
[packages/vim.git] / 7.3.428
CommitLineData
03d4279c
AM
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.428
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.428
11Problem: Win32: an xpm file without a mask crashes Vim.
12Solution: Fail when the mask is missing. (Dave Bodenstab)
13Files: src/xpm_w32.c
14
15
16*** ../vim-7.3.427/src/xpm_w32.c 2010-08-15 21:57:25.000000000 +0200
17--- src/xpm_w32.c 2012-02-05 00:46:13.000000000 +0100
18***************
19*** 1,4 ****
20! /*
21 * Load XPM image.
22 *
23 * This function is placed in separate file because Xpm headers conflict with
24--- 1,5 ----
25! /* vi:set ts=8 sts=4 sw=4:
26! *
27 * Load XPM image.
28 *
29 * This function is placed in separate file because Xpm headers conflict with
30***************
31*** 30,38 ****
32 #include "xpm.h"
33
34 /*
35! * Tries to load Xpm image from file 'filename'.
36! * If fails return -1.
37! * success - 0 and image and mask BITMAPS
38 */
39 int
40 LoadXpmImage(filename, hImage, hShape)
41--- 31,40 ----
42 #include "xpm.h"
43
44 /*
45! * Tries to load an Xpm image from the file "filename".
46! * Returns -1 on failure.
47! * Returns 0 on success and stores image and mask BITMAPS in "hImage" and
48! * "hShape".
49 */
50 int
51 LoadXpmImage(filename, hImage, hShape)
52***************
53*** 40,46 ****
54 HBITMAP *hImage;
55 HBITMAP *hShape;
56 {
57! XImage *img; /* loaded image */
58 XImage *shp; /* shapeimage */
59 XpmAttributes attr;
60 int res;
61--- 42,48 ----
62 HBITMAP *hImage;
63 HBITMAP *hShape;
64 {
65! XImage *img; /* loaded image */
66 XImage *shp; /* shapeimage */
67 XpmAttributes attr;
68 int res;
69***************
70*** 51,60 ****
71 DeleteDC(hdc);
72 if (res < 0)
73 return -1;
74! else
75 {
76! *hImage = img->bitmap;
77! *hShape = shp->bitmap;
78! return 0;
79 }
80 }
81--- 53,65 ----
82 DeleteDC(hdc);
83 if (res < 0)
84 return -1;
85! if (shp == NULL)
86 {
87! if (img)
88! XDestroyImage(img);
89! return -1;
90 }
91+ *hImage = img->bitmap;
92+ *hShape = shp->bitmap;
93+ return 0;
94 }
95*** ../vim-7.3.427/src/version.c 2012-02-05 00:39:14.000000000 +0100
96--- src/version.c 2012-02-05 00:47:08.000000000 +0100
97***************
98*** 716,717 ****
99--- 716,719 ----
100 { /* Add new patch number below this line */
101+ /**/
102+ 428,
103 /**/
104
105--
106I'm not familiar with this proof, but I'm aware of a significant
107following of toddlers who believe that peanut butter is the solution
108to all of life's problems... -- Tim Hammerquist
109
110 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
111/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
112\\\ an exciting new programming language -- http://www.Zimbu.org ///
113 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.037782 seconds and 4 git commands to generate.