Console: do not index nonexistent character codes
This commit is contained in:
parent
e1f38bd5ea
commit
722494af44
@ -125,6 +125,10 @@ struct Console
|
|||||||
*/
|
*/
|
||||||
private static void render_char(size_t x, size_t y, char ch)
|
private static void render_char(size_t x, size_t y, char ch)
|
||||||
{
|
{
|
||||||
|
if (ch > 127)
|
||||||
|
{
|
||||||
|
ch = 0u;
|
||||||
|
}
|
||||||
const(CharInfo) * ci = &Kfont.chars[ch];
|
const(CharInfo) * ci = &Kfont.chars[ch];
|
||||||
Fb.blit_alpha_bitmap(x + ci.left, y + ci.top, ci.bitmap, ci.width, ci.height);
|
Fb.blit_alpha_bitmap(x + ci.left, y + ci.top, ci.bitmap, ci.width, ci.height);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user