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
ccbf1d25
Commit
ccbf1d25
authored
Nov 28, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Return error when visible rectangle is empty in get_vis_rectangles.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55950
parent
95c87562
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
printproc.c
dlls/wineps.drv/printproc.c
+9
-6
No files found.
dlls/wineps.drv/printproc.c
View file @
ccbf1d25
...
...
@@ -301,7 +301,7 @@ static void clip_visrect(HDC hdc, RECT *dst, const RECT *src)
DeleteObject
(
hrgn
);
}
static
void
get_vis_rectangles
(
HDC
hdc
,
struct
ps_bitblt_coords
*
dst
,
static
BOOL
get_vis_rectangles
(
HDC
hdc
,
struct
ps_bitblt_coords
*
dst
,
const
XFORM
*
xform
,
DWORD
width
,
DWORD
height
,
struct
ps_bitblt_coords
*
src
)
{
RECT
rect
;
...
...
@@ -323,7 +323,8 @@ static void get_vis_rectangles(HDC hdc, struct ps_bitblt_coords *dst,
get_bounding_rect
(
&
rect
,
dst
->
x
,
dst
->
y
,
dst
->
width
,
dst
->
height
);
clip_visrect
(
hdc
,
&
dst
->
visrect
,
&
rect
);
if
(
!
src
)
return
;
if
(
IsRectEmpty
(
&
dst
->
visrect
))
return
FALSE
;
if
(
!
src
)
return
TRUE
;
rect
.
left
=
src
->
log_x
;
rect
.
top
=
src
->
log_y
;
...
...
@@ -341,7 +342,7 @@ static void get_vis_rectangles(HDC hdc, struct ps_bitblt_coords *dst,
if
(
rect
.
bottom
>
height
)
rect
.
bottom
=
height
;
src
->
visrect
=
rect
;
intersect_vis_rectangles
(
dst
,
src
);
return
intersect_vis_rectangles
(
dst
,
src
);
}
static
int
stretch_blt
(
print_ctx
*
ctx
,
const
EMRSTRETCHBLT
*
blt
,
...
...
@@ -363,7 +364,8 @@ static int stretch_blt(print_ctx *ctx, const EMRSTRETCHBLT *blt,
if
(
!
blt
->
cbBmiSrc
)
{
get_vis_rectangles
(
ctx
->
hdc
,
&
dst
,
NULL
,
0
,
0
,
NULL
);
if
(
!
get_vis_rectangles
(
ctx
->
hdc
,
&
dst
,
NULL
,
0
,
0
,
NULL
))
return
TRUE
;
return
PSDRV_PatBlt
(
ctx
,
&
dst
,
blt
->
dwRop
);
}
...
...
@@ -373,8 +375,9 @@ static int stretch_blt(print_ctx *ctx, const EMRSTRETCHBLT *blt,
src
.
log_height
=
blt
->
cySrc
;
src
.
layout
=
0
;
get_vis_rectangles
(
ctx
->
hdc
,
&
dst
,
&
blt
->
xformSrc
,
bi
->
bmiHeader
.
biWidth
,
abs
(
bi
->
bmiHeader
.
biHeight
),
&
src
);
if
(
!
get_vis_rectangles
(
ctx
->
hdc
,
&
dst
,
&
blt
->
xformSrc
,
bi
->
bmiHeader
.
biWidth
,
abs
(
bi
->
bmiHeader
.
biHeight
),
&
src
))
return
TRUE
;
memcpy
(
dst_info
,
bi
,
blt
->
cbBmiSrc
);
memset
(
&
bits
,
0
,
sizeof
(
bits
));
...
...
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