diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-12-07 22:29:27 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-12-08 11:58:08 +0000 |
commit | ba531f60532022e3419628e506462b6b84279478 (patch) | |
tree | d45ddbab4a6dad6a8c776bb27ca2c3f08bc548ad /fitz | |
parent | 4e4c33095f62e9a02fc338baec367ae89fe51c2a (diff) | |
download | mupdf-ba531f60532022e3419628e506462b6b84279478.tar.xz |
Round instead of truncate when converting reals to ints in fz_to_int.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/base_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/base_object.c b/fitz/base_object.c index 64fafad0..8e8ac313 100644 --- a/fitz/base_object.c +++ b/fitz/base_object.c @@ -207,7 +207,7 @@ int fz_to_int(fz_obj *obj) if (fz_is_int(obj)) return obj->u.i; if (fz_is_real(obj)) - return obj->u.f; + return (int)(obj->u.f + 0.5f); /* No roundf in MSVC */ return 0; } |