Skip to content

Commit

Permalink
make aggmode=MAX slightly less broken for negative values
Browse files Browse the repository at this point in the history
  • Loading branch information
r00t- committed Mar 18, 2021
1 parent 801d971 commit b2782d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void Buffer::aggregate(int aggtime, bool aggFixedInterval) {
lock();
if (_aggmode == MAX) {
Reading *latest = NULL;
double aggvalue = DBL_MIN;
double aggvalue = -DBL_MAX;
for (iterator it = _sent.begin(); it != _sent.end(); it++) {
if (!it->deleted()) {
if (!latest) {
Expand Down

0 comments on commit b2782d8

Please sign in to comment.