mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 16:58:01 +02:00
Fix to not right-shift a negative number when called with an argument of 0.
This commit is contained in:
parent
7a9d207040
commit
a82cf0eb7b
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue