Guard against divide by zero error in -A reg report
This commit is contained in:
parent
61edd3d8f4
commit
d406aeb85d
1 changed files with 1 additions and 1 deletions
|
|
@ -362,7 +362,7 @@ public:
|
|||
|
||||
OPTION_(report_t, average, DO() { // -A
|
||||
parent->HANDLER(display_total_)
|
||||
.set_expr(string("--average"), "total_expr/count");
|
||||
.set_expr(string("--average"), "count>0?(total_expr/count):0");
|
||||
});
|
||||
|
||||
OPTION__(report_t, balance_format_, CTOR(report_t, balance_format_) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue