diff options
Diffstat (limited to 'lib/vtxprintf.c')
-rw-r--r-- | lib/vtxprintf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/vtxprintf.c b/lib/vtxprintf.c index bc3621b91b0d..8a95ca1ec410 100644 --- a/lib/vtxprintf.c +++ b/lib/vtxprintf.c @@ -202,8 +202,11 @@ int vtxprintf(void (*tx_byte)(unsigned char byte, void *arg), void *arg, const c len = strnlen(s, precision); for (i = 0; i < len; ++i) - if (!isprint(*s[i])) + if (!isprint(*s[i])) { s = "<non-ASCII characters>"; + len = strlen(s); + break; + } if (!(flags & LEFT)) while (len < field_width--) tx_byte(' ', arg), count++; |