diff --git a/docs/ACKNOWLEDGEMENTS.md b/docs/ACKNOWLEDGEMENTS.md index 0ed75d8..4de176d 100644 --- a/docs/ACKNOWLEDGEMENTS.md +++ b/docs/ACKNOWLEDGEMENTS.md @@ -111,6 +111,7 @@ is acknowledged and greatly appreciated: * Andriy Galetski, and also [thinrope](https://codeberg.org/thinrope) - suggested the "**--sparse**" option ([#45](https://codeberg.org/ivarch/pv/issues/45)) * [KimHansen](https://codeberg.org/KimHansen) - suggested that "**--watchfd**" should keep its display when the process ends ([#81](https://codeberg.org/ivarch/pv/issues/81)) * [njt](https://codeberg.org/njt) - suggested that "**--size** @*PATH*" should accept directories ([#179](https://codeberg.org/ivarch/pv/issues/179)) + * [mojohakase](https://codeberg.org/mojohakase) - provided fix for multiplication bug when combining "**--bits**" with "**--gauge**" ([#182](https://codeberg.org/ivarch/pv/issues/182)) Translations provided through [Codeberg Weblate](https://translate.codeberg.org/projects/pv/): diff --git a/docs/NEWS.md b/docs/NEWS.md index d881b6e..d1b2e82 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -1,3 +1,7 @@ +### UNRELEASED + + * *fix:* when using **--bits** with **--gauge**, don't incorrectly multiply the rate twice ([#182](https://codeberg.org/ivarch/pv/issues/182)) + ### 1.10.4 - 8 March 2026 * *fix:* when using **--size @PATH**, *PATH* can be a directory, and the total size of all files within it will be used ([#179](https://codeberg.org/ivarch/pv/issues/179)) diff --git a/src/pv/calc.c b/src/pv/calc.c index 16be41f..c9b7b65 100644 --- a/src/pv/calc.c +++ b/src/pv/calc.c @@ -119,9 +119,6 @@ void pv_calculate_transfer_rate(pvtransfercalc_t calc, readonly_pvtransferstate_ calc->prev_elapsed_sec = transfer->elapsed_seconds; calc->prev_trans = 0; - if (control->bits) - measured_rate = 8.0 * measured_rate; - if ((calc->measurements_taken < 1) || (measured_rate < calc->rate_min)) { calc->rate_min = measured_rate; }