File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
1919### Fixed
2020
21+ - [ audio] Fixed integer overflow in throughput calculation
2122- [ main] Fixed ` --volume-ctrl fixed ` not disabling volume control
2223- [ core] Fix default permissions on credentials file and warn user if file is world readable
2324- [ core] Try all resolved addresses for the dealer connection instead of failing after the first one.
Original file line number Diff line number Diff line change @@ -120,8 +120,8 @@ async fn receive_data(
120120 if measure_throughput {
121121 let duration = Instant :: now ( ) . duration_since ( request_time) . as_millis ( ) ;
122122 if actual_length > 0 && duration > 0 {
123- let throughput = ONE_SECOND . as_millis ( ) as usize * actual_length / duration as usize ;
124- file_data_tx. send ( ReceivedData :: Throughput ( throughput) ) ?;
123+ let throughput = ONE_SECOND . as_millis ( ) * actual_length as u128 / duration ;
124+ file_data_tx. send ( ReceivedData :: Throughput ( throughput as usize ) ) ?;
125125 }
126126 }
127127
You can’t perform that action at this time.
0 commit comments