diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-21 12:13:30 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-21 12:13:51 +0200 |
commit | 24f4528dbfb93656c39e0cc3190ada72351e120f (patch) | |
tree | 6f564aef6fd9f03107f7c4e776e0cf4b52c42e0a | |
parent | 441fd0d2d813d0453c942566bdb43393662bb261 (diff) | |
download | mupdf-24f4528dbfb93656c39e0cc3190ada72351e120f.tar.xz |
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.
-rw-r--r-- | include/mupdf/fitz/text.h | 8 |
1 files 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; |