summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_painter.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdp/xrdp_painter.c')
-rw-r--r--xrdp/xrdp_painter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c
index c50a7493..7da56c21 100644
--- a/xrdp/xrdp_painter.c
+++ b/xrdp/xrdp_painter.c
@@ -584,6 +584,7 @@ xrdp_painter_line(struct xrdp_painter* self,
int k;
int dx;
int dy;
+ int rop;
if (self == 0)
{
@@ -606,12 +607,17 @@ xrdp_painter_line(struct xrdp_painter* self,
x2 += dx;
y2 += dy;
k = 0;
+ rop = self->rop;
+ if (rop < 0x01 || rop > 0x10)
+ {
+ rop = (rop & 0xf) + 1;
+ }
while (xrdp_region_get_rect(region, k, &rect) == 0)
{
if (rect_intersect(&rect, &clip_rect, &draw_rect))
{
libxrdp_orders_line(self->session, 0, x1, y1, x2, y2,
- self->rop, self->bg_color,
+ rop, self->bg_color,
&self->pen, &draw_rect);
}
k++;