mirror of
https://github.com/aristocratos/btop.git
synced 2024-06-18 18:34:36 +12:00
Correct data types in calls to std::accumulate(). The "bandwidth" deques have type "long long", so the initial value of the accumulator (0) must also be "long long" (i.e., "0ll") to prevent integer overflows. Also, since since the bandwidth deques are (signed) "long long", the avg_speed should presumably be a signed "long long" instead of an unsigned "uint64_t". The previous behavior was for large bandwidth values to overflow the accumulator, resulting in a negative total, which then was cast to be a huge "uint64_t" value. As a consequence, the network graph autoscaling was broken for large bandwidths. |
||
---|---|---|
.. | ||
btop_collect.cpp |