提交 2e319850 编写于 作者: A Anton Indrawan

Fix QNX build: QNX defines sprintf under the std namespace. Use snprintf instead

上级 a3d35d7f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册