Browse Source

Fix for string->double default precision.

tags/2021-05-28
jules 12 years ago
parent
commit
da70f6d374
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      modules/juce_core/text/juce_String.cpp

+ 5
- 2
modules/juce_core/text/juce_String.cpp View File

@@ -431,7 +431,10 @@ namespace NumberToStringConverters
{
{
std::ostream o (this);
o.precision ((std::streamsize) numDecPlaces);
if (numDecPlaces > 0)
o.precision ((std::streamsize) numDecPlaces);
o << n;
}
@@ -467,7 +470,7 @@ namespace NumberToStringConverters
}
StackArrayStream strm (buffer);
len = strm.writeDouble (n, numDecPlaces <= 0 ? 20 : numDecPlaces);
len = strm.writeDouble (n, numDecPlaces);
jassert (len <= charsNeededForDouble);
return buffer;
}


Loading…
Cancel
Save