mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Fix GCC8 warning
This commit is contained in:
parent
41db3c460f
commit
2fe2204a9d
2
nnn.c
2
nnn.c
|
@ -1507,7 +1507,7 @@ static char *coolsize(off_t size)
|
||||||
rem /= 10;
|
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]);
|
snprintf(size_buf, 12, "%lu.%0*lu%c", (ulong)size, i, (ulong)rem, U[i]);
|
||||||
else
|
else
|
||||||
snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);
|
snprintf(size_buf, 12, "%lu%c", (ulong)size, U[i]);
|
||||||
|
|
Loading…
Reference in a new issue