Fix download progress rounding edge case
commit601c808b8d3d4eec76b215e56f1d56f4fe591367
authorDan McGee <dan@archlinux.org>
Thu, 3 Nov 2011 14:54:33 +0000 (3 09:54 -0500)
committerDan McGee <dan@archlinux.org>
Thu, 3 Nov 2011 14:54:33 +0000 (3 09:54 -0500)
tree506d237dc4b466a083377997f854ad8e5e829d21
parent1953fe43689054aded03eb166f4f987e7cc0dccd
Fix download progress rounding edge case

Allan's original message: Occasionally when the download rate showed
100.0 the output got messed up. This was caused by the rounding of a
number between 99.95 and 100.  Adjust the threshold to avoid this
rounding issue.

Dan: make this fix, but also show values between 0 and 9.995 with two
decimal places since we have the room.

Original-fix-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
src/pacman/callback.c