diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-07-01 21:08:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-07-01 21:08:51 +0000 |
commit | fa4bfb2d6646beec782e044cfad05e2d058af57c (patch) | |
tree | 39f57246af96542a5f39f61cdaa21a7870cd0ffb /usr.bin/mandoc/mdoc_macro.c | |
parent | ca6fcb04727b0a682cdc8d6f343652194facc20d (diff) |
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 'usr.bin/mandoc/mdoc_macro.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index e14f6ac00a1..e69a94b46d9 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.51 2010/07/01 15:36:59 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.52 2010/07/01 21:08:50 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1020,6 +1020,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); |