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.
This commit is contained in:
John Wiegley 2009-02-17 22:57:02 -04:00
parent 4ec2dfeef1
commit 4414fddb00
2 changed files with 5 additions and 4 deletions

View file

@ -527,10 +527,11 @@ void interval_xacts::operator()(xact_t& xact)
}
interval.begin = quant;
}
subtotal_xacts::operator()(xact);
} else {
item_handler<xact_t>::operator()(xact);
}
subtotal_xacts::operator()(xact);
last_xact = &xact;
}

View file

@ -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;
}