From 24f4528dbfb93656c39e0cc3190ada72351e120f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 21 Apr 2016 12:13:30 +0200 Subject: Make bit fields in fz_text_span unsigned. markup_dir being a signed 2-bit int meant that it could not represent FZ_BIDI_NEUTRAL without overflow; so we always ended up creating a new text span for each glyph with that directionality. --- include/mupdf/fitz/text.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mupdf/fitz/text.h b/include/mupdf/fitz/text.h index 52035bc5..637da51d 100644 --- a/include/mupdf/fitz/text.h +++ b/include/mupdf/fitz/text.h @@ -39,10 +39,10 @@ struct fz_text_span_s { fz_font *font; fz_matrix trm; - int wmode : 1; /* 0 horizontal, 1 vertical */ - int bidi_level : 7; /* The bidirectional level of text */ - int markup_dir : 2; /* The direction of text as marked in the original document */ - int language : 15; /* The language as marked in the original document */ + unsigned wmode : 1; /* 0 horizontal, 1 vertical */ + unsigned bidi_level : 7; /* The bidirectional level of text */ + unsigned markup_dir : 2; /* The direction of text as marked in the original document */ + unsigned language : 15; /* The language as marked in the original document */ int len, cap; fz_text_item *items; fz_text_span *next; -- cgit v1.2.3