From c132621c55fe67aa5a27fc4bfb5c5a9eed8941b0 Mon Sep 17 00:00:00 2001 From: SamNet-dev Date: Tue, 17 Feb 2026 15:55:50 -0600 Subject: [PATCH] =?UTF-8?q?Fix=20box=20border=20misalignment=20=E2=80=94?= =?UTF-8?q?=20normalize=20literal=20\033=20in=20=5Fstrlen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mtproxymax.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mtproxymax.sh b/mtproxymax.sh index bff41de..76d4bc4 100644 --- a/mtproxymax.sh +++ b/mtproxymax.sh @@ -127,6 +127,8 @@ TERM_WIDTH=$(tput cols 2>/dev/null || echo 60) _strlen() { local clean="$1" local esc=$'\033' + # Normalize literal \033 (from single-quoted color vars) to real ESC byte + clean="${clean//$'\\033'/$esc}" # Strip ANSI escape sequences in pure bash (no subprocesses) while [[ "$clean" == *"${esc}["* ]]; do local before="${clean%%${esc}\[*}"