Removed trailing zeros when DynamicVariables=1 even if a value is such as "1.01000".

E.g.
 1.00000 -> 1
 1.01000 -> 1.01
 1.01001 -> 1.01001
This commit is contained in:
spx
2011-07-02 10:16:38 +00:00
parent 8ae8a68547
commit 341e9d2bd0
3 changed files with 25 additions and 8 deletions

View File

@ -983,7 +983,8 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
if (result != -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;