From 275da22752f690f202269e2a0dc5cd405e0490e2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 16 Feb 2009 17:17:57 -0400 Subject: Fixed the --head and --tail options --- src/chain.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/chain.cc b/src/chain.cc index dae72db1..aa5ef0ab 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -49,9 +49,12 @@ xact_handler_ptr chain_xact_handlers(report_t& report, // truncate_entries cuts off a certain number of _entries_ from being // displayed. It does not affect calculation. if (report.HANDLED(head_) || report.HANDLED(tail_)) - handler.reset(new truncate_entries(handler, - report.HANDLER(head_).value.to_long(), - report.HANDLER(tail_).value.to_long())); + handler.reset + (new truncate_entries(handler, + report.HANDLED(head_) ? + report.HANDLER(head_).value.to_long() : 0, + report.HANDLED(tail_) ? + report.HANDLER(tail_).value.to_long() : 0)); // filter_xacts will only pass through xacts matching the // `display_predicate'. -- cgit v1.2.3