summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libshouldbeinlibc/timefmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshouldbeinlibc/timefmt.c b/libshouldbeinlibc/timefmt.c
index 1ae48922..add5001f 100644
--- a/libshouldbeinlibc/timefmt.c
+++ b/libshouldbeinlibc/timefmt.c
@@ -176,7 +176,7 @@ add_field (int *secs, int unit, int *leading_zeros,
int units = *secs / unit;
if (units || (width >= min_width && *leading_zeros))
{
- *secs -= units;
+ *secs -= units * unit;
*leading_zeros = 1;
return
sprintf (buf,