Add missing cast in _pixman_edge_multi_init()
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 18 Dec 2011 14:54:47 +0000 (09:54 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 9 Jan 2012 10:40:33 +0000 (05:40 -0500)
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

index c99f03e..adf5d7b 100644 (file)
@@ -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;
     }