Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4d4c0a2d
Commit
4d4c0a2d
authored
Jul 05, 2005
by
Frank Richter
Committed by
Alexandre Julliard
Jul 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UXTHEME_LoadImage(): Set default image count to 1 to avoid division by
zero in case image count property is not given. Properly support 0 state IDs.
parent
abb11f30
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
draw.c
dlls/uxtheme/draw.c
+3
-3
No files found.
dlls/uxtheme/draw.c
View file @
4d4c0a2d
...
...
@@ -190,7 +190,7 @@ static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iState
HBITMAP
*
hBmp
,
RECT
*
bmpRect
)
{
int
imagelayout
=
IL_VERTICAL
;
int
imagecount
=
0
;
int
imagecount
=
1
;
BITMAP
bmp
;
WCHAR
szPath
[
MAX_PATH
];
PTHEME_PROPERTY
tp
=
UXTHEME_SelectImage
(
hTheme
,
hdc
,
iPartId
,
iStateId
,
pRect
,
glyph
);
...
...
@@ -213,12 +213,12 @@ static HRESULT UXTHEME_LoadImage(HTHEME hTheme, HDC hdc, int iPartId, int iState
int
height
=
bmp
.
bmHeight
/
imagecount
;
bmpRect
->
left
=
0
;
bmpRect
->
right
=
bmp
.
bmWidth
;
bmpRect
->
top
=
(
m
in
(
imagecount
,
iStateId
)
-
1
)
*
height
;
bmpRect
->
top
=
(
m
ax
(
min
(
imagecount
,
iStateId
),
1
)
-
1
)
*
height
;
bmpRect
->
bottom
=
bmpRect
->
top
+
height
;
}
else
{
int
width
=
bmp
.
bmWidth
/
imagecount
;
bmpRect
->
left
=
(
m
in
(
imagecount
,
iStateId
)
-
1
)
*
width
;
bmpRect
->
left
=
(
m
ax
(
min
(
imagecount
,
iStateId
),
1
)
-
1
)
*
width
;
bmpRect
->
right
=
bmpRect
->
left
+
width
;
bmpRect
->
top
=
0
;
bmpRect
->
bottom
=
bmp
.
bmHeight
;
...
...
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