From 1288ade9edf222a1334b9d627b1f3cca401bd0d2 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 21 Aug 2018 17:44:24 +0200 Subject: 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. --- mthread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mthread.c') 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; } -- cgit 1.4.1