diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index d2979a7d..37fe23bc 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1547,7 +1547,8 @@ void RainmeterWriteKeyValueWide(const WCHAR* arg) if (formula != -1) { WCHAR buffer[256]; - _snwprintf_s(buffer, _TRUNCATE, L"%f", value); + int len = _snwprintf_s(buffer, _TRUNCATE, L"%.5f", value); + CMeasure::RemoveTrailingZero(buffer, len); const std::wstring& resultString = buffer;