aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb1be2297051d05342ce460b198946cf9a4b42c44 (patch)
tree28901134f2a18e0632a2db4a6b8713145e8e7c3e /term.c
parentfd72c5c12848eeda1017f8937b0ff7e4a36a0a7d (diff)
downloadmandoc-b1be2297051d05342ce460b198946cf9a4b42c44.tar.gz
mandoc-b1be2297051d05342ce460b198946cf9a4b42c44.tar.zst
mandoc-b1be2297051d05342ce460b198946cf9a4b42c44.zip
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/term.c b/term.c
index c6a40150..2eaae01a 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.223 2014/04/23 21:06:41 schwarze Exp $ */
+/* $Id: term.c,v 1.224 2014/07/06 18:51:13 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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) {