You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by st...@apache.org on 2002/04/19 04:59:51 UTC
cvs commit: modperl-docs/lib/DocSet Util.pm
stas 02/04/18 19:59:51
Modified: lib/DocSet Util.pm
Log:
fix a bug where a few sizes fell through
Revision Changes Path
1.10 +4 -3 modperl-docs/lib/DocSet/Util.pm
Index: Util.pm
===================================================================
RCS file: /home/cvs/modperl-docs/lib/DocSet/Util.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Util.pm 13 Apr 2002 15:44:20 -0000 1.9
+++ Util.pm 19 Apr 2002 02:59:51 -0000 1.10
@@ -245,17 +245,18 @@
if ($bytes < KBYTE) {
return sprintf "%5dB", $bytes;
}
- elsif (KBYTE < $bytes and $bytes < MBYTE) {
+ elsif (KBYTE <= $bytes and $bytes < MBYTE) {
return sprintf "%4.@{[int($bytes/KBYTE) < 10 ? 1 : 0]}fKiB", $bytes/KBYTE;
}
- elsif (MBYTE < $bytes and $bytes < GBYTE) {
+ elsif (MBYTE <= $bytes and $bytes < GBYTE) {
return sprintf "%4.@{[int($bytes/MBYTE) < 10 ? 1 : 0]}fMiB", $bytes/MBYTE;
}
- elsif (GBYTE < $bytes) {
+ elsif (GBYTE <= $bytes) {
return sprintf "%4.@{[int($bytes/GBYTE) < 10 ? 1 : 0]}fGiB", $bytes/GBYTE;
}
else {
# shouldn't happen
+ die "cannot handle formatting of $bytes"
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org