Fix to not right-shift a negative number when called with an argument of 0.

This commit is contained in:
Carl Worth 2005-08-18 09:46:20 +00:00
parent 7a9d207040
commit a82cf0eb7b
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-08-18 Carl Worth <cworth@cworth.org>
* src/cairo-fixed.c: (_cairo_fixed_integer_ceil): Fix to not
right-shift a negative number when called with an argument of 0.
2005-08-18 Carl Worth <cworth@cworth.org>
* test/cairo-test.c: (cairo_test_expecting): Disable

View file

@ -84,7 +84,7 @@ _cairo_fixed_integer_floor (cairo_fixed_t f)
int
_cairo_fixed_integer_ceil (cairo_fixed_t f)
{
if (f >= 0)
if (f > 0)
return ((f - 1)>>16) + 1;
else
return - (-f >> 16);