summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-10-02 15:47:54 +0200
committerHans de Goede <hdegoede@redhat.com>2016-06-17 11:21:30 +0200
commitc6511d0142040654140bdedd6f03d43af0abba21 (patch)
tree3f7fc866bad3e2caec35137ed50fbd7fba73f165 /render
parent2d6230e77348e550c90e00c007b113ce38c81d12 (diff)
exa: only draw valid trapezoids
Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484 If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly. A similar fix should also be applied to pixman. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'render')
-rw-r--r--render/picture.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/picture.h b/render/picture.h
index 087e54d7a..4499a0021 100644
--- a/render/picture.h
+++ b/render/picture.h
@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed;
/* whether 't' is a well defined not obviously empty trapezoid */
#define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \
(t)->right.p1.y != (t)->right.p2.y && \
- (int) ((t)->bottom - (t)->top) > 0)
+ ((t)->bottom > (t)->top))
/*
* Standard NTSC luminance conversions: