Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d03d23d9
Commit
d03d23d9
authored
Nov 14, 1998
by
Huw D M Davies
Committed by
Alexandre Julliard
Nov 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix allocation size in CreateDIBPatternBrush*.
parent
ea495f0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
brush.c
objects/brush.c
+11
-8
No files found.
objects/brush.c
View file @
d03d23d9
...
...
@@ -113,8 +113,9 @@ HBRUSH16 WINAPI CreateDIBPatternBrush16( HGLOBAL16 hbitmap, UINT16 coloruse )
if
(
info
->
bmiHeader
.
biCompression
)
size
=
info
->
bmiHeader
.
biSizeImage
;
else
size
=
(
info
->
bmiHeader
.
biWidth
*
info
->
bmiHeader
.
biBitCount
+
31
)
/
32
*
8
*
info
->
bmiHeader
.
biHeight
;
size
=
DIB_GetDIBWidthBytes
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biBitCount
)
*
info
->
bmiHeader
.
biHeight
;
size
+=
DIB_BitmapInfoSize
(
info
,
coloruse
);
if
(
!
(
logbrush
.
lbHatch
=
(
INT16
)
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
)))
...
...
@@ -162,8 +163,9 @@ HBRUSH32 WINAPI CreateDIBPatternBrush32(
if
(
info
->
bmiHeader
.
biCompression
)
size
=
info
->
bmiHeader
.
biSizeImage
;
else
size
=
(
info
->
bmiHeader
.
biWidth
*
info
->
bmiHeader
.
biBitCount
+
31
)
/
32
*
8
*
info
->
bmiHeader
.
biHeight
;
size
=
DIB_GetDIBWidthBytes
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biBitCount
)
*
info
->
bmiHeader
.
biHeight
;
size
+=
DIB_BitmapInfoSize
(
info
,
coloruse
);
if
(
!
(
logbrush
.
lbHatch
=
(
INT32
)
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
)))
...
...
@@ -174,7 +176,7 @@ HBRUSH32 WINAPI CreateDIBPatternBrush32(
newInfo
=
(
BITMAPINFO
*
)
GlobalLock16
(
(
HGLOBAL16
)
logbrush
.
lbHatch
);
memcpy
(
newInfo
,
info
,
size
);
GlobalUnlock16
(
(
HGLOBAL16
)
logbrush
.
lbHatch
);
GlobalUnlock
16
(
hbitmap
);
GlobalUnlock
32
(
hbitmap
);
return
CreateBrushIndirect32
(
&
logbrush
);
}
...
...
@@ -200,7 +202,7 @@ HBRUSH32 WINAPI CreateDIBPatternBrushPt32(
BITMAPINFO
*
newInfo
;
INT32
size
;
TRACE
(
gdi
,
"%
04x
\n
"
,
info
);
TRACE
(
gdi
,
"%
p
\n
"
,
info
);
/* Make a copy of the bitmap */
...
...
@@ -208,8 +210,9 @@ HBRUSH32 WINAPI CreateDIBPatternBrushPt32(
if
(
info
->
bmiHeader
.
biCompression
)
size
=
info
->
bmiHeader
.
biSizeImage
;
else
size
=
(
info
->
bmiHeader
.
biWidth
*
info
->
bmiHeader
.
biBitCount
+
31
)
/
32
*
8
*
info
->
bmiHeader
.
biHeight
;
size
=
DIB_GetDIBWidthBytes
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biBitCount
)
*
info
->
bmiHeader
.
biHeight
;
size
+=
DIB_BitmapInfoSize
(
info
,
coloruse
);
if
(
!
(
logbrush
.
lbHatch
=
(
INT32
)
GlobalAlloc16
(
GMEM_MOVEABLE
,
size
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment