diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-01 21:12:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-01 21:12:00 +0000 |
commit | 78cd93e807f59c2887a762ae28988154d0c7f7d8 (patch) | |
tree | b0281068440e422b70cac2a926ee052a2728da7e /mdoc_macro.c | |
parent | 72ef1a02b61a65916df100dacb53fc1315b215f5 (diff) | |
download | mandoc-78cd93e807f59c2887a762ae28988154d0c7f7d8.tar.gz |
Correct handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
The bug was uncovered by SYNOPSIS .Nm as this happened to be the first
block with this particular combination of properties.
Found the hard way by kristaps@ in NetBSD gcc-contrib(1),
fix by me.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 99730eee..eba02df7 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1025,6 +1025,9 @@ blk_full(MACRO_PROT_ARGS) lac = ARGS_ERROR == ac ? ARGS_PEND : ac; ac = mdoc_args(m, line, pos, buf, tok, &p); + if (ARGS_PUNCT == ac) + break; + if (ARGS_ERROR == ac) return(0); |