Make sure only ASCII characters are rendered.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14039 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-08-21 15:09:43 +00:00
parent ef5ab08df3
commit 72a263b6cf
1 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,10 @@ get_palette_entry(uint8 index)
static void
render_glyph(int32 x, int32 y, uint8 glyph, uint8 attr)
{
// we're ASCII only
if (glyph > 127)
glyph = 127;
if (sConsole.depth >= 8) {
uint8 *base = (uint8 *)(sConsole.frame_buffer + sConsole.bytes_per_row * y * CHAR_HEIGHT
+ x * CHAR_WIDTH * sConsole.bytes_per_pixel);