aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit20bd05bc1165d2c8e7af3c9a8ec1282785f9bc0f (patch)
treee0b937c22574891f137adf621a77466c33154137 /roff.c
parent5d1129d2c6fc8ebde31436a6426534bcd634668d (diff)
downloadmandoc-20bd05bc1165d2c8e7af3c9a8ec1282785f9bc0f.tar.gz
mandoc-20bd05bc1165d2c8e7af3c9a8ec1282785f9bc0f.tar.zst
mandoc-20bd05bc1165d2c8e7af3c9a8ec1282785f9bc0f.zip
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index 94bcfa0e..31bed07a 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.269 2015/04/23 16:17:44 schwarze Exp $ */
+/* $Id: roff.c,v 1.270 2015/05/01 16:02:47 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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