summaryrefslogtreecommitdiff
path: root/lib/libutil/fmt_scaled.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-09-16 10:56:36 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-09-16 10:56:36 +0000
commite576eb33bad101c8e0afbb2d2c4c424148ddbc1d (patch)
treed30159f677e11ed893536852d535c18f1f6c5c49 /lib/libutil/fmt_scaled.c
parent1917e788ad1b36e3ff671aecc8c24ab3d7520b61 (diff)
fix 1099512676352 -> 2.0T; ok miod@
Diffstat (limited to 'lib/libutil/fmt_scaled.c')
-rw-r--r--lib/libutil/fmt_scaled.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/fmt_scaled.c b/lib/libutil/fmt_scaled.c
index 31657eb54d4..c868b4d321f 100644
--- a/lib/libutil/fmt_scaled.c
+++ b/lib/libutil/fmt_scaled.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fmt_scaled.c,v 1.3 2004/05/28 07:03:47 deraadt Exp $ */
+/* $OpenBSD: fmt_scaled.c,v 1.4 2004/09/16 10:56:35 otto Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved.
@@ -37,7 +37,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char ident[] = "$OpenBSD: fmt_scaled.c,v 1.3 2004/05/28 07:03:47 deraadt Exp $";
+static const char ident[] = "$OpenBSD: fmt_scaled.c,v 1.4 2004/09/16 10:56:35 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@@ -228,7 +228,7 @@ fmt_scaled(long long number, char *result)
/* scale fraction to one digit (by rounding) - thnx pjanzen */
for (i = SCALE_LENGTH-1; i > 0; i--) {
- if (fract > scale_factors[i]) {
+ if (fract >= scale_factors[i]) {
fract /= scale_factors[i];
break;
}