=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_macro.c,v retrieving revision 1.152 retrieving revision 1.153 diff -u -r1.152 -r1.153 --- src/usr.bin/mandoc/mdoc_macro.c 2015/04/29 14:48:17 1.152 +++ src/usr.bin/mandoc/mdoc_macro.c 2015/04/29 21:57:50 1.153 @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.152 2015/04/29 14:48:17 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.153 2015/04/29 21:57:50 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -671,6 +671,8 @@ if (endbody != NULL) n = endbody; + + ntok = TOKEN_NONE; for (j = 0; ; j++) { lastarg = *pos; @@ -698,7 +700,7 @@ } if (n != NULL) { - if (n != mdoc->last && n->flags & MDOC_BROKEN) { + if (ntok != TOKEN_NONE && n->flags & MDOC_BROKEN) { target = n; do target = target->parent;