From c95cd9ed5e5e89e1ed467dbd5b7d8c80f672a5a1 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 14 Jun 2019 15:35:58 +0000 Subject: Do not loop forever if a menu item contains invisible characters, reported by Thomas Sattler. --- format-draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'format-draw.c') diff --git a/format-draw.c b/format-draw.c index f8882ac2..b589ca5e 100644 --- a/format-draw.c +++ b/format-draw.c @@ -791,7 +791,8 @@ format_width(const char *expanded) } else if (*cp > 0x1f && *cp < 0x7f) { width++; cp++; - } + } else + cp++; } return (width); } -- cgit v1.2.3