usr/lib/byobu/.shutil: fix rounding error in fpdiv

This commit is contained in:
Dustin Kirkland 2011-10-21 13:40:14 -05:00
commit 30830dfedd
2 changed files with 6 additions and 2 deletions

6
debian/changelog vendored
View file

@ -1,5 +1,6 @@
byobu (4.42) unreleased; urgency=low
[ Dustin Kirkland ]
* usr/lib/byobu/.constants, usr/lib/byobu/reboot_required:
- fix arrows to work better with ubuntu mono font
- add reboot symbol
@ -16,7 +17,10 @@ byobu (4.42) unreleased; urgency=low
* usr/lib/byobu/.constants, usr/lib/byobu/network:
- save a few more chars, drop the "ps" per second
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 14 Oct 2011 14:53:51 -0500
[Scott Moser]
* usr/lib/byobu/.shutil: fix rounding error in fpdiv
-- Scott Moser <smoser@brickies> Fri, 21 Oct 2011 13:31:59 -0400
byobu (4.41-0ubuntu1) precise; urgency=low

View file

@ -174,7 +174,7 @@ fpdiv() {
n=$(((${mp}*${a})/${b}))
# round up if necessary
[ $(($n%${mp})) -ge $((${mp}/2)) ] && n=$(($n+5))
[ $((($n-5)/10)) = $(($n/10)) ] && n=$(($n+5))
# drop the last digit, which was only there for rounding
n=${n%?}