From eefe765f00f0972537ce7ac7e355dc528858f226 Mon Sep 17 00:00:00 2001 From: Robert Allan James Date: Tue, 11 Aug 2026 08:35:48 -0400 Subject: [PATCH] starkernel: item 4.4e -- fix console_putc() forwarding \n to vt100_putc() without \r console_putc() mirrored raw '\n' to vt100_putc() while raw_putc() (serial path) auto-injects '\r' before '\n'. vt100_putc()'s '\n' handler only increments the row, never resets the column, so every line after the first started at whatever column the previous line ended on instead of column 0 -- confirmed by screendump as diagonal text scatter across the framebuffer. Latent since this code was written; invisible until 4.4c turned the framebuffer console on for the first time. Co-Authored-By: Claude Sonnet 5 --- src/starkernel/hal/console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/starkernel/hal/console.c b/src/starkernel/hal/console.c index 3083c7e..551b385 100644 --- a/src/starkernel/hal/console.c +++ b/src/starkernel/hal/console.c @@ -230,6 +230,7 @@ void console_putc(char c) { /* --- framebuffer VT100 path (when available) --- */ if (fb_is_available()) { + if (c == '\n') vt100_putc('\r'); vt100_putc(c); } }