diff --git a/format-draw.c b/format-draw.c index b0b050f6..51404254 100644 --- a/format-draw.c +++ b/format-draw.c @@ -837,7 +837,8 @@ format_trim_left(const char *expanded, u_int limit) *out++ = *cp; width++; cp++; - } + } else + cp++; } *out = '\0'; return (copy); @@ -883,7 +884,8 @@ format_trim_right(const char *expanded, u_int limit) *out++ = *cp; width++; cp++; - } + } else + cp++; } *out = '\0'; return (copy);