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
1 changed files with 2 additions and 2 deletions

View File

@ -57,10 +57,10 @@ static TextChar EntryToTextChar(uint16_t entry)
static uint16_t CharToTextEntry(TextChar c) 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 bool VGATextBuffer::UsablePosition(TextPos pos) const
{ {
return pos.x < width && pos.y < height; return pos.x < width && pos.y < height;