about summary refs log tree commit diff
path: root/mthread.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-08-21 17:44:24 +0200
committerLeah Neukirchen <leah@vuxu.org>2018-08-21 17:44:24 +0200
commit1288ade9edf222a1334b9d627b1f3cca401bd0d2 (patch)
tree73be41ed16749e9487b8a4aaf825dbd8d54e1eae /mthread.c
parentd82e7d45551da35bf06591633ceb934a6e78500d (diff)
downloadmblaze-1288ade9edf222a1334b9d627b1f3cca401bd0d2.tar.gz
mblaze-1288ade9edf222a1334b9d627b1f3cca401bd0d2.tar.xz
mblaze-1288ade9edf222a1334b9d627b1f3cca401bd0d2.zip
mthread: keep toplevel thread date-order when pruning
Else this could result in a toplevel thread getting pruned, but its
child has an older date than was calculated by newest(), messing up the
order.
Diffstat (limited to 'mthread.c')
-rw-r--r--mthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mthread.c b/mthread.c
index cb59a99..3dbccbb 100644
--- a/mthread.c
+++ b/mthread.c
@@ -307,7 +307,8 @@ prune_tree(struct container *c, int depth)
 			c->mid = c->child->mid;
 			c->file = c->child->file;
 			c->msg = c->child->msg;
-			c->date = c->child->date;
+			if (c->child->date > c->date)
+				c->date = c->child->date;
 			c->optional = c->child->optional;
 			c->child = c->child->child;
 		}