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;