From feee5d1a235960cd9737d8171d429d9e4acd27cb Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 6 Jul 2014 18:51:13 +0000 Subject: After skipping an escape sequence with incomplete arguments, do not throw away the rest of the string to be rendered. --- term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 9c5afc72..abae31e5 100644 --- a/term.c +++ b/term.c @@ -444,7 +444,7 @@ term_word(struct termp *p, const char *word) word++; esc = mandoc_escape(&word, &seq, &sz); if (ESCAPE_ERROR == esc) - break; + continue; if (TERMENC_ASCII != p->enc) switch (esc) { @@ -683,7 +683,7 @@ term_strlen(const struct termp *p, const char *cp) cp++; esc = mandoc_escape(&cp, &seq, &ssz); if (ESCAPE_ERROR == esc) - return(sz); + continue; if (TERMENC_ASCII != p->enc) switch (esc) { -- cgit