[Pixman] [PATCH 2/5] Add missing cast in _pixman_edge_multi_init()

Søren Sandmann sandmann at cs.au.dk
Thu Dec 22 13:35:43 PST 2011


From: Søren Sandmann Pedersen <ssp at redhat.com>

nx and e->dy are both 32 bit quantities, so a cast is needed to make
sure their product is 64 bit before subtracting it from a 64 bit
quantity.
---
 pixman/pixman-trap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pixman/pixman-trap.c b/pixman/pixman-trap.c
index c99f03e..adf5d7b 100644
--- a/pixman/pixman-trap.c
+++ b/pixman/pixman-trap.c
@@ -139,7 +139,7 @@ _pixman_edge_multi_init (pixman_edge_t * e,
     if (ne > 0)
     {
 	int nx = ne / e->dy;
-	ne -= nx * e->dy;
+	ne -= nx * (pixman_fixed_48_16_t)e->dy;
 	stepx += nx * e->signdx;
     }
 
-- 
1.6.0.6



More information about the Pixman mailing list