aboutsummaryrefslogtreecommitdiffstats
path: root/nnn.c
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-07 22:23:15 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-11-07 22:23:15 +0530
commit2fe2204a9d7aea2f3031714ff1b857f1e0d54eca (patch)
tree6183b3fb0186f95d821ef48419b38f8b23779c7e /nnn.c
parent41db3c460f2c626c2cefd92ae78973f52a9563ae (diff)
downloadnnn-2fe2204a9d7aea2f3031714ff1b857f1e0d54eca.tar.gz
Fix GCC8 warning
Diffstat (limited to 'nnn.c')
-rw-r--r--nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nnn.c b/nnn.c
index 8fd177d..9ab3745 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1507,7 +1507,7 @@ static char *coolsize(off_t size)
rem /= 10;
}
- if (i > 0)
+ if (i > 0 && i < 6)
snprintf(size_buf, 12, "%lu.%0*lu%c", (ulong)size, i, (ulong)rem, U[i]);
else
snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);