summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-01-07 12:19:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-01-07 12:19:46 +0000
commite6c9abbf114c99a1129abc43042a13152945a5f0 (patch)
tree58b012664a0014d501085e1ddab669b4e12d8caf
parent562ad46e1cccb5e403986e0f63d5ac9000758ba1 (diff)
downloadmandoc-e6c9abbf114c99a1129abc43042a13152945a5f0.tar.gz
Bugfix: When the invocation of a user-defined macro follows a roff
conditional request on the same input line, don't skip the first few bytes of its content.
-rw-r--r--roff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index 518a8fd1..d0ddc4a3 100644
--- a/roff.c
+++ b/roff.c
@@ -2169,6 +2169,7 @@ roff_userdef(ROFF_ARGS)
buf->buf = n1;
if (buf->sz == 0)
buf->sz = strlen(buf->buf) + 1;
+ *offs = 0;
return(buf->sz > 1 && buf->buf[buf->sz - 2] == '\n' ?
ROFF_REPARSE : ROFF_APPEND);