mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 18:10:27 +01: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;
|
||||
|
||||
char formatString[6];
|
||||
sprintf(formatString, "%%.%dg", precision);
|
||||
snprintf(formatString, sizeof(formatString), "%%.%dg", precision);
|
||||
|
||||
// Print into the buffer. We need not request the alternative representation
|
||||
// that always has a decimal point because JSON doesn't distingish the
|
||||
|
Loading…
Reference in New Issue
Block a user