[qwaq] Ensure background color clearing works

Even with 0 for the character, colors should get into the buffer.
This commit is contained in:
Bill Currie 2020-03-19 20:39:23 +09:00
parent 3a28d84c3f
commit f329ca83b6
1 changed files with 4 additions and 4 deletions

View File

@ -91,6 +91,9 @@
int *dst = buffer;
int *end = buffer + size.width * size.height;
if (ch && !(ch & 0xff)) {
ch |= ' ';
}
while (dst < end) {
*dst++ = ch;
}
@ -129,10 +132,7 @@
cursor.y++;
} else if (ch == '\r') {
cursor.x = 0;
} else if (ch & 0xff) {
if ((ch & 0xff) < 32) {
ch = (ch & ~0xff) | 32;
}
} else {
if (!(ch & ~0xff)) {
ch |= background & ~0xff;
}