diff options
author | inmarket <inmarket@ugfx.org> | 2017-03-11 14:23:27 +1000 |
---|---|---|
committer | inmarket <inmarket@ugfx.org> | 2017-03-11 14:23:27 +1000 |
commit | 9500ed2bcc8c579bd56f4e4cdb27376ebc727046 (patch) | |
tree | 49b3fb8da6dab79080f3b2b9771a362b7d93d9cc /src/gdisp | |
parent | 7826664969f077342e098a1679faadf2b0b590d5 (diff) | |
download | uGFX-9500ed2bcc8c579bd56f4e4cdb27376ebc727046.tar.gz uGFX-9500ed2bcc8c579bd56f4e4cdb27376ebc727046.tar.bz2 uGFX-9500ed2bcc8c579bd56f4e4cdb27376ebc727046.zip |
Fix a bug that can cause large fonts to not be read correctly.
Diffstat (limited to 'src/gdisp')
-rw-r--r-- | src/gdisp/mcufont/mf_bwfont.h | 2 | ||||
-rw-r--r-- | src/gdisp/mcufont/mf_rlefont.c | 2 | ||||
-rw-r--r-- | src/gdisp/mcufont/mf_rlefont.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gdisp/mcufont/mf_bwfont.h b/src/gdisp/mcufont/mf_bwfont.h index 761352df..f7fda527 100644 --- a/src/gdisp/mcufont/mf_bwfont.h +++ b/src/gdisp/mcufont/mf_bwfont.h @@ -63,7 +63,7 @@ struct mf_bwfont_s const uint8_t version; /* Number of character ranges. */ - const uint8_t char_range_count; + const uint16_t char_range_count; /* Array of the character ranges */ const struct mf_bwfont_char_range_s *char_ranges; diff --git a/src/gdisp/mcufont/mf_rlefont.c b/src/gdisp/mcufont/mf_rlefont.c index 2ef89fd1..a4c598ea 100644 --- a/src/gdisp/mcufont/mf_rlefont.c +++ b/src/gdisp/mcufont/mf_rlefont.c @@ -46,7 +46,7 @@ static const uint8_t *find_glyph(const struct mf_rlefont_s *font, index = character - range->first_char; if (character >= range->first_char && index < range->char_count) { - uint16_t offset = range->glyph_offsets[index]; + unsigned offset = range->glyph_offsets[index]; return &range->glyph_data[offset]; } } diff --git a/src/gdisp/mcufont/mf_rlefont.h b/src/gdisp/mcufont/mf_rlefont.h index 7e717ccc..15fbc5eb 100644 --- a/src/gdisp/mcufont/mf_rlefont.h +++ b/src/gdisp/mcufont/mf_rlefont.h @@ -60,7 +60,7 @@ struct mf_rlefont_s const uint8_t dict_entry_count; /* Number of discontinuous character ranges */ - const uint8_t char_range_count; + const uint16_t char_range_count; /* Array of the character ranges */ const struct mf_rlefont_char_range_s *char_ranges; |