Skip to content
Commit 96c9bf7e authored by Andre Przywara's avatar Andre Przywara Committed by Anatolij Gustschin
Browse files

video/console: Fix DM_VIDEO font glyph array indexing



When the character to be printed on a DM_VIDEO console is from the
"extended ASCII" range (0x80 - 0xff), it will be treated as a negative
number, as it's declared as a signed char. This leads to negative array
indicies into the glyph bitmap array, and random garbled characters.

Cast the character to an unsigned type to make the index always positive
and avoid an out-of-bounds access.

Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 57e77754
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment