mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 18:27:10 +01: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;
|
||||
|
||||
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
|
||||
// that always has a decimal point because JSON doesn't distinguish the
|
||||
|
Loading…
Reference in New Issue
Block a user