mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-06 00:53:16 +02:00
Merge pull request #707 from remyjette/valuetostring-sign-mismatch
Fix sign mismatch in `valueToString`
This commit is contained in:
commit
c39aa295e4
@ -125,7 +125,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
|
|||||||
int len = -1;
|
int len = -1;
|
||||||
|
|
||||||
char formatString[15];
|
char formatString[15];
|
||||||
snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
|
snprintf(formatString, sizeof(formatString), "%%.%ug", precision);
|
||||||
|
|
||||||
// Print into the buffer. We need not request the alternative representation
|
// Print into the buffer. We need not request the alternative representation
|
||||||
// that always has a decimal point because JSON doesn't distinguish the
|
// that always has a decimal point because JSON doesn't distinguish the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user