mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:49:58 +00:00
Use default 0 precision in the float formatting (bug #4096)
This commit is contained in:
parent
f594eda574
commit
4bb349a525
1 changed files with 2 additions and 4 deletions
|
@ -34,21 +34,19 @@ namespace Misc
|
||||||
|
|
||||||
if (i < m.size())
|
if (i < m.size())
|
||||||
{
|
{
|
||||||
int precision = 0;
|
int precision = -1;
|
||||||
bool precisionSet = false;
|
|
||||||
if (m[i] == '.')
|
if (m[i] == '.')
|
||||||
{
|
{
|
||||||
|
precision = 0;
|
||||||
while (++i < m.size() && m[i] >= '0' && m[i] <= '9')
|
while (++i < m.size() && m[i] >= '0' && m[i] <= '9')
|
||||||
{
|
{
|
||||||
precision = precision * 10 + (m[i] - '0');
|
precision = precision * 10 + (m[i] - '0');
|
||||||
precisionSet = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < m.size())
|
if (i < m.size())
|
||||||
{
|
{
|
||||||
width = (widthSet) ? width : -1;
|
width = (widthSet) ? width : -1;
|
||||||
precision = (precisionSet) ? precision : -1;
|
|
||||||
|
|
||||||
if (m[i] == 'S' || m[i] == 's')
|
if (m[i] == 'S' || m[i] == 's')
|
||||||
visitedPlaceholder(StringPlaceholder, pad, width, precision);
|
visitedPlaceholder(StringPlaceholder, pad, width, precision);
|
||||||
|
|
Loading…
Reference in a new issue