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
43240527
Commit
43240527
authored
Aug 29, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Pass valid dimensions to GetDIBits.
parent
94bef59b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
cursoricon.c
dlls/user32/cursoricon.c
+5
-6
No files found.
dlls/user32/cursoricon.c
View file @
43240527
...
...
@@ -2732,12 +2732,11 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
memcpy
(
bi
,
&
ds
.
dsBmih
,
sizeof
(
BITMAPINFOHEADER
));
}
/* Get the color table or the color masks */
GetDIBits
(
dc
,
hnd
,
0
,
ds
.
dsBm
.
bmHeight
,
NULL
,
bi
,
DIB_RGB_COLORS
);
bi
->
bmiHeader
.
biWidth
=
desiredx
;
bi
->
bmiHeader
.
biHeight
=
desiredy
;
bi
->
bmiHeader
.
biSizeImage
=
0
;
/* Get the color table or the color masks */
GetDIBits
(
dc
,
hnd
,
0
,
ds
.
dsBm
.
bmHeight
,
NULL
,
bi
,
DIB_RGB_COLORS
);
res
=
CreateDIBSection
(
dc
,
bi
,
DIB_RGB_COLORS
,
&
bits
,
NULL
,
0
);
DeleteDC
(
dc
);
...
...
@@ -2753,8 +2752,8 @@ HANDLE WINAPI CopyImage( HANDLE hnd, UINT type, INT desiredx,
/* The source bitmap is a DIB section.
Get its attributes */
HDC
dc
=
CreateCompatibleDC
(
NULL
);
bi
->
bmiHeader
.
bi
Size
=
sizeof
(
bi
->
bmiHeader
)
;
bi
->
bmiHeader
.
bi
BitCount
=
ds
.
dsBm
.
bmBitsPixel
;
bi
->
bmiHeader
.
bi
Width
=
ds
.
dsBm
.
bmWidth
;
bi
->
bmiHeader
.
bi
Height
=
ds
.
dsBm
.
bmHeight
;
GetDIBits
(
dc
,
hnd
,
0
,
ds
.
dsBm
.
bmHeight
,
NULL
,
bi
,
DIB_RGB_COLORS
);
DeleteDC
(
dc
);
...
...
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