aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Borner2019-10-28 13:01:31 +0100
committerMarvin Borner2019-10-28 13:01:31 +0100
commitbbe7014e2926c6bfdfae20f12048bfe4e951c0e1 (patch)
tree8fe17b5bd18d80789d41b6ec4547563e31430797
parentff91840abbc9ab421c67dc3aca0de42af22d8219 (diff)
Fixed one inversion
-rw-r--r--src/kernel/graphics/vesa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c
index 379109d..a74050f 100644
--- a/src/kernel/graphics/vesa.c
+++ b/src/kernel/graphics/vesa.c
@@ -257,12 +257,12 @@ void vesa_clear() {
void vesa_draw_char(char ch) {
if (ch >= ' ') {
- int pos = (terminal_x - 8) * vbe_bpl + (terminal_y - 16) * vbe_pitch;
+ int pos = terminal_x * vbe_bpl + terminal_y * vbe_pitch;
int mask[8] = {1, 2, 4, 8, 16, 32, 64, 128};
unsigned char *glyph = font[ch - 32];
char *draw = (char *) &fb[pos];
- for (int cy = 0; cy < 13; cy++) {
+ for (int cy = 12; cy >= 0; cy--) {
for (int cx = 0; cx < 8; cx++) {
if (glyph[cy] & mask[cx]) {
draw[vbe_bpl * cx] = terminal_color[2];