summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-05-01 16:02:47 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-05-01 16:02:47 +0000
commit14900fe7cc68ef746633548fdd98ddfc1085d664 (patch)
treec83903e66004c84c16a80498c3a1ae558370d5c0 /roff.c
parent69c57487163693701fa1106b63c28ab9fb674ede (diff)
downloadmandoc-14900fe7cc68ef746633548fdd98ddfc1085d664.tar.gz
Setting the "last" member of struct roff_node was done at an extremely
weird place. Move it to the obviously correct place. Surprisingly, this didn't cause any misformatting in the test suite or in any base system manuals, but i cannot believe the code was really correct for all conceivable input, and it would be very hard to verify. At the very least, it cannot have worked for man(7).
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index ca0f85a4..4ab928c5 100644
--- a/roff.c
+++ b/roff.c
@@ -1022,6 +1022,7 @@ roff_node_append(struct roff_man *man, struct roff_node *n)
/* NOTREACHED */
}
n->parent->nchild++;
+ n->parent->last = n;
/*
* Copy over the normalised-data pointer of our parent. Not