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:Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
Loading
Please register or sign in to comment