From 3edac120d2a5bd857ad17345e85e1d26873d530b Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Wed, 11 Feb 2026 15:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A0=8F:=20=E5=86=85?= =?UTF-8?q?=E5=AD=98=E5=B0=8F=E4=BA=8E=201KB=20=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/status.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status.c b/src/status.c index 2dcfe75..362f3f9 100644 --- a/src/status.c +++ b/src/status.c @@ -101,8 +101,11 @@ static void bytes_to_readable_size(uint64_t bytes, char *str) { size /= 1024.0; ++i; } - - sprintf(str, "%.1lf%s", size, uints[i]); + if (i == 0) { + sprintf(str, "%ld%s", bytes, uints[i]); + } else { + sprintf(str, "%.1lf%s", size, uints[i]); + } } static void calc_mem_usage(memory_usage_t *usage) {