diff options
author | Mole Shang <[email protected]> | 2023-08-10 22:37:22 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-03-01 22:30:14 +0800 |
commit | 2a4121c0e76f988a45b91145a9e2f50595817f81 (patch) | |
tree | 8c1b8c13d2f3ea04c396d4db99e82ae32b5a5cf5 /src/ui.c | |
parent | 6d9c1c8396ef374dce59d4c95199d0155a6fdfa3 (diff) | |
download | hinata-2a4121c0e76f988a45b91145a9e2f50595817f81.tar.gz hinata-2a4121c0e76f988a45b91145a9e2f50595817f81.tar.bz2 hinata-2a4121c0e76f988a45b91145a9e2f50595817f81.zip |
ui: cast stat numbers to nk_size
... to fix incorrect pct calcs on win64 (where nk_size == unsigned long long)
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -28,7 +28,7 @@ void load_ui(struct ui_struct *ui) { poll_status(ui->stat); if (ui->stat->total) { - pct = (ui->stat->cur) * 100 / (ui->stat->total); + pct = ((nk_size)ui->stat->cur) * (nk_size)100 / ((nk_size)ui->stat->total); if (ui->stat->type == SIZE_BYTES) { size_info_t info_cur = num2sizeinfo(ui->stat->cur); size_info_t info_total = num2sizeinfo(ui->stat->total); |