summaryrefslogtreecommitdiff
path: root/source/fitz/util.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-09-28 14:02:45 +0100
committerRobin Watts <robin.watts@artifex.com>2015-09-30 17:35:41 +0100
commit399a04b4af991c71826ce0e6962a23b4f8fa127d (patch)
treec53064539c43ecda9672397c07ce37c9c5bcf991 /source/fitz/util.c
parentc9006427633b2f366212ed0731ac67a90245455f (diff)
downloadmupdf-399a04b4af991c71826ce0e6962a23b4f8fa127d.tar.xz
Fix windows build of fitz/util.c
Use +/-FLT_MAX rather than INT_MIN/MAX for floats. Avoid mid-block definitions of vars.
Diffstat (limited to 'source/fitz/util.c')
-rw-r--r--source/fitz/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/fitz/util.c b/source/fitz/util.c
index 6e001d56..4d1f60bf 100644
--- a/source/fitz/util.c
+++ b/source/fitz/util.c
@@ -331,8 +331,8 @@ fz_new_buffer_from_text_page(fz_context *ctx, fz_text_page *text, const fz_rect
if (fz_is_infinite_rect(sel))
{
- x0 = y0 = INT_MIN;
- x1 = y1 = INT_MAX;
+ x0 = y0 = -FLT_MAX;
+ x1 = y1 = FLT_MAX;
}
else
{
@@ -362,8 +362,9 @@ fz_new_buffer_from_text_page(fz_context *ctx, fz_text_page *text, const fz_rect
{
for (i = 0; i < span->len; i++)
{
+ int c;
fz_text_char_bbox(ctx, &hitbox, span, i);
- int c = span->text[i].c;
+ c = span->text[i].c;
if (c < 32)
c = '?';
if (hitbox.x1 >= x0 && hitbox.x0 <= x1 && hitbox.y1 >= y0 && hitbox.y0 <= y1)