summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-06 18:51:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-06 18:51:13 +0000
commitfeee5d1a235960cd9737d8171d429d9e4acd27cb (patch)
tree12aee8ceeb1350c0461bd7a07b4d4e7ddabde622 /term.c
parent5eaec7ed97bfa1484b76aede3839264d785e2a26 (diff)
downloadmandoc-feee5d1a235960cd9737d8171d429d9e4acd27cb.tar.gz
After skipping an escape sequence with incomplete arguments,
do not throw away the rest of the string to be rendered.
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
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) {