From 1041823d4225f0f6c641910f0c30aee841e3e361 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Mon, 30 Jul 2012 18:56:47 +0200 Subject: [PATCH] Fixed VGA text buffer rendering non-ascii text incorrectly. --- sortix/vgatextbuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sortix/vgatextbuffer.cpp b/sortix/vgatextbuffer.cpp index c949e35c..e14569b7 100644 --- a/sortix/vgatextbuffer.cpp +++ b/sortix/vgatextbuffer.cpp @@ -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;