From 4414fddb00849132495b0a30938af0f296dee32f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 17 Feb 2009 22:57:02 -0400 Subject: Fixed use of the -p flag without an interval That is, -p 2004/01 is equivalent to "-b 2004/01/01 -e 2004/01/31" again. --- src/filters.cc | 5 +++-- src/filters.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/filters.cc b/src/filters.cc index 276ecaba..5f7a79a1 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -527,10 +527,11 @@ void interval_xacts::operator()(xact_t& xact) } interval.begin = quant; } + subtotal_xacts::operator()(xact); + } else { + item_handler::operator()(xact); } - subtotal_xacts::operator()(xact); - last_xact = &xact; } diff --git a/src/filters.h b/src/filters.h index 66d0dd2e..d5636796 100644 --- a/src/filters.h +++ b/src/filters.h @@ -598,8 +598,8 @@ public: } void report_subtotal() { - assert(last_xact); - subtotal_xacts::report_subtotal(); + if (last_xact && interval) + subtotal_xacts::report_subtotal(); last_xact = NULL; } -- cgit v1.2.3