diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index d68af77..c5782b0 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -781,7 +781,11 @@ std::string Reader::getLocationLineAndColumn(Location location) const { getLocationLineAndColumn(location, line, column); char buffer[18 + 16 + 16 + 1]; #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) + #if defined(WINCE) + _snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + #else sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column); + #endif #else snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); #endif diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index cf61f01..46f32e1 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -73,7 +73,11 @@ std::string valueToString(double value) { #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with // visual studio 2005 to // avoid warning. + #if defined(WINCE) + _snprintf(buffer, sizeof(buffer), "%.16g", value); + #else sprintf_s(buffer, sizeof(buffer), "%.16g", value); + #endif #else snprintf(buffer, sizeof(buffer), "%.16g", value); #endif