summaryrefslogtreecommitdiff
path: root/src/cairo-wideint.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-01-20 02:01:29 -0800
committerCarl Worth <cworth@cworth.org>2007-01-20 02:01:29 -0800
commit87b3ac10af6b18d57236ae7e595e84e11e12eaad (patch)
tree29a7550e3950a7cd9fbc1eec47135e7e2bff3889 /src/cairo-wideint.c
parentd6bb0d772018809caaa215d562292c8aeb2990d3 (diff)
cairo-wideint: Fix to eliminate comparison of signed and unsigned values
Diffstat (limited to 'src/cairo-wideint.c')
-rw-r--r--src/cairo-wideint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c
index 1e64ae47..e8d3ab69 100644
--- a/src/cairo-wideint.c
+++ b/src/cairo-wideint.c
@@ -781,7 +781,7 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num, cairo_int64_t den)
{
int num_neg = _cairo_int128_negative (num);
int den_neg = _cairo_int64_negative (den);
- cairo_int64_t nonneg_den = den;
+ cairo_uint64_t nonneg_den;
cairo_uquorem64_t uqr;
cairo_quorem64_t qr;
@@ -789,6 +789,8 @@ _cairo_int_96by64_32x64_divrem (cairo_int128_t num, cairo_int64_t den)
num = _cairo_int128_negate (num);
if (den_neg)
nonneg_den = _cairo_int64_negate (den);
+ else
+ nonneg_den = den;
uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
if (_cairo_uint64_eq (uqr.rem, nonneg_den)) {