From e1f58c0163a49eb0804dfa209bf8239797febcd3 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 26 Oct 2022 20:14:24 +0200 Subject: [PATCH] Kernel: If wrapping a line at screen bottom, scroll properly --- kernel/src/render/TextRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/render/TextRenderer.cpp b/kernel/src/render/TextRenderer.cpp index 6d47cabc..4084c03f 100644 --- a/kernel/src/render/TextRenderer.cpp +++ b/kernel/src/render/TextRenderer.cpp @@ -79,7 +79,7 @@ void TextRenderer::putchar(char chr) { xpos = 0; ypos += FONT_HEIGHT; - if (ypos > bootboot.fb_height) + if ((ypos + FONT_HEIGHT) >= bootboot.fb_height) { memcpy((void*)bootboot.fb_ptr, (char*)bootboot.fb_ptr + (bootboot.fb_scanline * FONT_HEIGHT), bootboot.fb_size - (bootboot.fb_scanline * FONT_HEIGHT));