mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-06-09 09:47:35 +02:00
Fix QNX build: QNX defines sprintf under the std namespace. Use snprintf instead
This commit is contained in:
parent
a3d35d7fb8
commit
2e319850d1
@ -143,7 +143,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
|
|||||||
int len = -1;
|
int len = -1;
|
||||||
|
|
||||||
char formatString[6];
|
char formatString[6];
|
||||||
sprintf(formatString, "%%.%dg", precision);
|
snprintf(formatString, sizeof(formatString), "%%.%dg", 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 distingish the
|
// that always has a decimal point because JSON doesn't distingish the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user