mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 23:20:05 +02:00
Fix improper format specifier in printf
%d in format string requires 'int' but the argument type is 'unsigned int'.
This commit is contained in:
@@ -106,9 +106,9 @@ static void printValueTree(FILE* fout,
|
||||
for (Json::ArrayIndex index = 0; index < size; ++index) {
|
||||
static char buffer[16];
|
||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
|
||||
sprintf_s(buffer, sizeof(buffer), "[%d]", index);
|
||||
sprintf_s(buffer, sizeof(buffer), "[%u]", index);
|
||||
#else
|
||||
snprintf(buffer, sizeof(buffer), "[%d]", index);
|
||||
snprintf(buffer, sizeof(buffer), "[%u]", index);
|
||||
#endif
|
||||
printValueTree(fout, value[index], path + buffer);
|
||||
}
|
||||
|
Reference in New Issue
Block a user