mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
Use explicit cast long to float
This commit is contained in:
parent
2faefc3b24
commit
1e63f69520
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ char *cropstr(const char *from, int s) {
|
|||
|
||||
|
||||
float formatsize(int64_t from, const char **unit) {
|
||||
float r = from;
|
||||
float r = (float)from;
|
||||
if (si) {
|
||||
if(r < 1000.0f) { *unit = " B"; }
|
||||
else if(r < 1e6f) { *unit = "KB"; r/=1e3f; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue