From 9a9edbda2eac927118816e37531f3ae06f9a773e Mon Sep 17 00:00:00 2001 From: spx Date: Mon, 4 Jul 2011 18:05:07 +0000 Subject: [PATCH] Additional fix for r843. --- Library/Rainmeter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;