From d8db60b34ac5cc0b0662813f8e4413b1e8d00881 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 16 May 2026 17:33:20 -0400 Subject: [PATCH] [bugfix] splash goes into infinite loop when vp is too small chris_s reported that a vp width of 1 wpuld cause the trxt reflow to go into an endless loop check for this and skip displaying the splash add a warning to the sim for catching unintentional cases of this Change-Id: I9e1c561f745b5bcf113d0a6cdff57a00cd190fd4 --- apps/gui/splash.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/gui/splash.c b/apps/gui/splash.c index 35c122869a..62182b3402 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c @@ -104,10 +104,13 @@ static bool splash_internal(struct screen * screen, const char *fmt, va_list ap, int res = vsnprintf(splash_buf, sizeof(splash_buf), fmt, ap); va_end(ap); - if (res <= 0) + if (res <= 0 || width < space_w || height < chr_h) { #ifdef SIMULATOR - printf("%s ERROR %d\n", __func__, res); + if (res <= 0) + printf("ERROR: %s %d\n", __func__, res); + else + printf("WARNING: %s vp too small\n", __func__); #endif return false; /* nothing to display */ }