From 9ae658983c452b21bcdbd7cbcf5ad23dad95f036 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 14 Jun 2019 15:35:58 +0000 Subject: [PATCH] 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(-) 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); }