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
986a534e
Commit
986a534e
authored
Apr 01, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Clip rectangle values to 16-bit limits.
parent
3d2fc2f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
graphics.c
dlls/winex11.drv/graphics.c
+9
-8
No files found.
dlls/winex11.drv/graphics.c
View file @
986a534e
...
...
@@ -36,6 +36,7 @@
#define PI M_PI
#endif
#include <string.h>
#include <limits.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -131,10 +132,10 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp )
for
(
j
=
data
->
rdh
.
nCount
-
1
;
j
>=
0
;
j
--
)
{
tmp
=
rect
[
j
];
xrect
[
j
].
x
=
tmp
.
left
;
xrect
[
j
].
y
=
tmp
.
top
;
xrect
[
j
].
width
=
tmp
.
right
-
tmp
.
left
;
xrect
[
j
].
height
=
tmp
.
bottom
-
tmp
.
top
;
xrect
[
j
].
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
)
;
xrect
[
j
].
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
)
;
xrect
[
j
].
width
=
max
(
min
(
tmp
.
right
-
xrect
[
j
].
x
,
USHRT_MAX
),
0
)
;
xrect
[
j
].
height
=
max
(
min
(
tmp
.
bottom
-
xrect
[
j
].
y
,
USHRT_MAX
),
0
)
;
}
}
else
...
...
@@ -142,10 +143,10 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp )
for
(
i
=
0
;
i
<
data
->
rdh
.
nCount
;
i
++
)
{
tmp
=
rect
[
i
];
xrect
[
i
].
x
=
tmp
.
left
;
xrect
[
i
].
y
=
tmp
.
top
;
xrect
[
i
].
width
=
tmp
.
right
-
tmp
.
left
;
xrect
[
i
].
height
=
tmp
.
bottom
-
tmp
.
top
;
xrect
[
i
].
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
)
;
xrect
[
i
].
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
)
;
xrect
[
i
].
width
=
max
(
min
(
tmp
.
right
-
xrect
[
i
].
x
,
USHRT_MAX
),
0
)
;
xrect
[
i
].
height
=
max
(
min
(
tmp
.
bottom
-
xrect
[
i
].
y
,
USHRT_MAX
),
0
)
;
}
}
return
data
;
...
...
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