diff options
author | Miles Bader <miles@gnu.org> | 1996-05-15 02:22:34 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-05-15 02:22:34 +0000 |
commit | 4cd8531d6b0614d8081dc41c58592c2046b0e366 (patch) | |
tree | fe602e93a5675c02e71fa6518f20a6c6709a579f /libshouldbeinlibc/timefmt.c | |
parent | 31dceaf6397f51f706a411824ef1a9af0040f29b (diff) |
(add_field): Correctly decrement *SECS by amount printed.
Diffstat (limited to 'libshouldbeinlibc/timefmt.c')
-rw-r--r-- | libshouldbeinlibc/timefmt.c | 2 |
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, |