summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-05-01 16:01:54 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-05-01 16:01:54 +0000
commit1884bb6738b198c3d176991d91656eeb9242fb82 (patch)
treea831a508db2aaa539ec62d5a125f607a52ca17a9 /usr.bin/mandoc/roff.c
parent80871623029d7eaceb46f14635ca9e50cf8398ad (diff)
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 'usr.bin/mandoc/roff.c')
-rw-r--r--usr.bin/mandoc/roff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c
index d82eb79552b..f99246a7686 100644
--- a/usr.bin/mandoc/roff.c
+++ b/usr.bin/mandoc/roff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roff.c,v 1.141 2015/04/23 16:17:04 schwarze Exp $ */
+/* $OpenBSD: roff.c,v 1.142 2015/05/01 16:01:53 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -1020,6 +1020,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