From 11e5b98a902ad3a8a1fc7c87fbacb7db65f8c6f2 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 23 Apr 2025 16:58:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E7=94=B5=E5=8E=8B=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=B0=8F=E4=BA=8E3V=EF=BC=8C=E5=B0=B1=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=AE=BE=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index ca73c134..3c317d38 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1019,7 +1019,14 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { continue; } - snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); + if (val < 3000) + { + strcpy(str, "0"); + } + else + { + snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); + } it->second = std::string(str); break; }