diff options
author | nicm <nicm> | 2019-04-24 20:27:52 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-05-01 07:12:02 +0100 |
commit | 901eed7b71cfb22bc7bd3a1500c74ef4f2fdb095 (patch) | |
tree | 39c5993b99402bf8d7e4ccbd5a655c81a611b4c7 | |
parent | 750d5830c2344d28bd6824681dfe5e3222933ef4 (diff) | |
download | rtmux-901eed7b71cfb22bc7bd3a1500c74ef4f2fdb095.tar.gz rtmux-901eed7b71cfb22bc7bd3a1500c74ef4f2fdb095.tar.bz2 rtmux-901eed7b71cfb22bc7bd3a1500c74ef4f2fdb095.zip |
Do not loop forever if there is a nonprintable character in the format.
-rw-r--r-- | format-draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |