summaryrefslogtreecommitdiffstats
path: root/format-draw.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-14 15:35:58 +0000
committernicm <nicm>2019-06-14 15:35:58 +0000
commitc95cd9ed5e5e89e1ed467dbd5b7d8c80f672a5a1 (patch)
treea19b87d69df322fc47b5e3be4d682c22fc9ebdea /format-draw.c
parentd1d3bbb458b50ec455d65774d5c6669546b3b4ca (diff)
Do not loop forever if a menu item contains invisible characters,
reported by Thomas Sattler.
Diffstat (limited to 'format-draw.c')
-rw-r--r--format-draw.c3
1 files changed, 2 insertions, 1 deletions
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);
}