From f606db40c3290fd9ce40b53ef9bbe135b1e6f6e2 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 24 Sep 2026 18:46:18 -0400 Subject: fix: tiny map alignment broke with certain characters --- internal/game/cmd_look.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/game/cmd_look.go') diff --git a/internal/game/cmd_look.go b/internal/game/cmd_look.go index 3e0bbc4..f01b83c 100644 --- a/internal/game/cmd_look.go +++ b/internal/game/cmd_look.go @@ -152,11 +152,11 @@ func (g *Game) writeLookSideBySide(sess *net.Session, p *player.Player, contentL if leftMap { sess.WriteLine(fmt.Sprintf("%s %s", mapLine, content)) } else { - pad := mapWidth + (len(content) - visibleLen(content)) + pad := mapWidth - visibleLen(content) if pad < 0 { pad = 0 } - sess.WriteLine(fmt.Sprintf("%-*s %s", pad, content, mapLine)) + sess.WriteLine(content + strings.Repeat(" ", pad) + " " + mapLine) } } else { sess.WriteLine(content) -- cgit v1.2.3