From e946d9c56cf6f66dc277241f64614e5e05ca4ea0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 26 Jul 2020 00:10:26 +0200 Subject: I'm so confused right now... I have to fix this tomorrow ig --- src/features/psf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/features/psf.c') diff --git a/src/features/psf.c b/src/features/psf.c index ef63161..d830426 100644 --- a/src/features/psf.c +++ b/src/features/psf.c @@ -26,7 +26,7 @@ int psf_verify(char *data) void psf_test(char *chars, int height, int width, int char_size) { char ch = 'a'; - int x = 50; + int x = 0; int y = 400; const u32 c[3] = { 0xff, 0x00, 0x00 }; @@ -36,10 +36,10 @@ void psf_test(char *chars, int height, int width, int char_size) char *draw = (char *)&fb[pos]; u16 row = 0; - for (int cy = 0; cy <= height; cy++) { - row = chars[ch * char_size + cy * ((width + 7) / 8)]; + for (int cy = 0; cy < height; cy++) { + row = chars[ch * char_size + cy * (char_size / height)]; - for (int cx = 0; cx <= width + 1; cx++) { + for (int cx = 0; cx < width; cx++) { if (row & (1 << (width - 1))) { draw[vbe_bpl * cx] = (char)c[2]; draw[vbe_bpl * cx + 1] = (char)c[1]; -- cgit v1.2.3