Skip to content

GFXfont elements first and last are of type uint16_t, but accessed with pgm_read_byte #490

@bassklampfe

Description

@bassklampfe

This will cause issues, when compiling on big-endian architecture.

Should use pgm_read_word(…) instead of pgm_read_byte(…) and functions like drawChar(…) should handle argument c and related variables as uint16_t and not unsigned char.

Became aware of this, when preparing a minimal patch to support UTF8 without big changes to Adafruit-GFX-Library.
My Diff has about 89 lines, where about half of the lines is above issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions