summaryrefslogtreecommitdiff
path: root/source/fitz/stext-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/stext-device.c')
-rw-r--r--source/fitz/stext-device.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c
index cae3c583..cd657acc 100644
--- a/source/fitz/stext-device.c
+++ b/source/fitz/stext-device.c
@@ -643,14 +643,13 @@ fz_stext_close_device(fz_context *ctx, fz_device *dev)
for (block = page->first_block; block; block = block->next)
{
- if (block->type == FZ_STEXT_BLOCK_TEXT)
+ if (block->type != FZ_STEXT_BLOCK_TEXT)
+ continue;
+ for (line = block->u.t.first_line; line; line = line->next)
{
- for (line = block->u.t.first_line; line; line = line->next)
- {
- for (ch = line->first_char; ch; ch = ch->next)
- fz_union_rect(&line->bbox, &ch->bbox);
- fz_union_rect(&block->bbox, &line->bbox);
- }
+ for (ch = line->first_char; ch; ch = ch->next)
+ fz_union_rect(&line->bbox, &ch->bbox);
+ fz_union_rect(&block->bbox, &line->bbox);
}
}