From 1caa360a53e12ea05c6de59f6671ec905d5a014c Mon Sep 17 00:00:00 2001 From: nadrad Date: Mon, 8 Apr 2024 08:28:53 +0200 Subject: [PATCH] improved width fix: changing strlen to strwidth --- h-m-m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h-m-m b/h-m-m index 0a2c426..b486dbf 100755 --- a/h-m-m +++ b/h-m-m @@ -3377,8 +3377,8 @@ function display(&$mm, $force_center = false) // ensuring that the line is long enough even if the map line is // shorter than the terminal width - if (mb_strlen($line) < $mm['terminal_width']) - $line .= str_repeat(' ', $mm['terminal_width'] - mb_strlen($line)); + if (mb_strwidth($line) < $mm['terminal_width']) + $line .= str_repeat(' ', $mm['terminal_width'] - mb_strwidth($line)); // this one really depends on (x,y), but after this, the // coordinates are not reliable anymore because of the