From 0f5740f6b61877138f93ba628e7cb669e64a27eb Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Mon, 18 May 2026 18:20:42 +0200 Subject: [PATCH] fix: remove redundant slen clamp and update stale comment Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/QuickMsgScreen.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/companion_radio/ui-new/QuickMsgScreen.h b/examples/companion_radio/ui-new/QuickMsgScreen.h index 13632482..ba7ec29e 100644 --- a/examples/companion_radio/ui-new/QuickMsgScreen.h +++ b/examples/companion_radio/ui-new/QuickMsgScreen.h @@ -88,14 +88,13 @@ class QuickMsgScreen : public UIScreen { &sensors, batt); } - // Build "@nick " prefix from a channel message text ("nick: body") into _reply_prefix. + // Build "@[nick] " prefix from a channel message text ("nick: body") into _reply_prefix. // Returns false if sender is "Me" (own message — no reply prefix needed). bool buildChannelReplyPrefix(const char* text) { const char* sep = strstr(text, ": "); if (!sep) return false; int slen = (int)(sep - text); if (slen == 2 && strncmp(text, "Me", 2) == 0) return false; - if (slen > 32) slen = 32; if (slen > 31) slen = 31; snprintf(_reply_prefix, sizeof(_reply_prefix), "@[%.*s] ", slen, text); return true;