paleofetch

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9c8add08dada379b4affbdb3df5a4aec3f1aaea0
parent 31c9406b4646c018b16c013f81366372ff5053f5
Author: sam-barr <samfbarr@outlook.com>
Date:   Thu, 23 Apr 2020 11:28:28 -0500

fix get_uptime to always print number of minutes

Diffstat:
Mpaleofetch.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paleofetch.c b/paleofetch.c @@ -194,7 +194,7 @@ char *get_uptime() { int n, len = 0; char *uptime = malloc(BUF_SIZE); for (int i = 0; i < 3; ++i ) { - if ((n = seconds / units[i].secs)) + if ((n = seconds / units[i].secs) || i == 2) /* always print minutes */ len += snprintf(uptime + len, BUF_SIZE - len, "%d %s%s, ", n, units[i].name, n > 1 ? "s": ""); seconds %= units[i].secs;