diff options
author | Carl Worth <cworth@cworth.org> | 2005-08-18 09:46:20 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-08-18 09:46:20 +0000 |
commit | a82cf0eb7bdfb7f500c1652f6b9635a94e830289 (patch) | |
tree | efcc5a51ba17d46121edba353a8522b4d89222ee | |
parent | 7a9d2070402d75356ffee258517c5434dc232000 (diff) |
Fix to not right-shift a negative number when called with an argument of 0.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/cairo-fixed.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,10 @@ 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 not-yet-implemented quartz stuff. diff --git a/src/cairo-fixed.c b/src/cairo-fixed.c index a4faa1708..2c1c58725 100644 --- a/src/cairo-fixed.c +++ b/src/cairo-fixed.c @@ -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); |