=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_macro.c,v retrieving revision 1.60 retrieving revision 1.61 diff -c -r1.60 -r1.61 *** src/usr.bin/mandoc/mdoc_macro.c 2010/12/01 22:02:29 1.60 --- src/usr.bin/mandoc/mdoc_macro.c 2010/12/21 23:46:18 1.61 *************** *** 1,4 **** ! /* $Id: mdoc_macro.c,v 1.60 2010/12/01 22:02:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze --- 1,4 ---- ! /* $Id: mdoc_macro.c,v 1.61 2010/12/21 23:46:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze *************** *** 250,255 **** --- 250,256 ---- static int rew_last(struct mdoc *mdoc, const struct mdoc_node *to) { + struct mdoc_node *n; assert(to); mdoc->next = MDOC_NEXT_SIBLING; *************** *** 258,265 **** --- 259,268 ---- while (mdoc->last != to) { if ( ! mdoc_valid_post(mdoc)) return(0); + n = mdoc->last; mdoc->last = mdoc->last->parent; assert(mdoc->last); + mdoc->last->last = n; } return(mdoc_valid_post(mdoc));