1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fixed VGA text buffer rendering non-ascii text incorrectly.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-07-30 18:56:47 +02:00
parent 3b0f165c4f
commit 1041823d42

View file

@ -57,10 +57,10 @@ static TextChar EntryToTextChar(uint16_t entry)
static uint16_t CharToTextEntry(TextChar c)
{
return (uint16_t) c.c | (uint16_t) c.vgacolor << 8U;
unsigned char uc = c.c;
return (uint16_t) uc | (uint16_t) c.vgacolor << 8U;
}
bool VGATextBuffer::UsablePosition(TextPos pos) const
{
return pos.x < width && pos.y < height;