aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nyancat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nyancat.c b/src/nyancat.c
index 36d58c4..3a7a4b2 100644
--- a/src/nyancat.c
+++ b/src/nyancat.c
@@ -569,10 +569,10 @@ ready:
time(&current);
double diff = difftime(current, start);
/* Now count the length of the time difference so we can center */
- int nLen = (int)diff;
+ int nLen = digits((int)diff);
int width = (80 - 29 - nLen) / 2;
/* Spit out some spaces so that we're actually centered */
- while (width) {
+ while (width > 0) {
printf(" ");
width--;
}