From 1344b56dc5b6de2d18ad44ff764dba11f3bc59a0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 23 May 2023 12:39:24 -0400 Subject: [PATCH] jsoncpp: Cast dap integer to largest JsonCpp integer type JsonCpp is not always built with support for `int64_t`. --- src/jsoncpp_json_serializer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jsoncpp_json_serializer.cpp b/src/jsoncpp_json_serializer.cpp index 5683c6f..954b0e5 100644 --- a/src/jsoncpp_json_serializer.cpp +++ b/src/jsoncpp_json_serializer.cpp @@ -179,7 +179,7 @@ bool JsonCppSerializer::serialize(dap::boolean v) { } bool JsonCppSerializer::serialize(dap::integer v) { - *json = (int64_t)v; + *json = (Json::LargestInt)v; return true; } @@ -210,7 +210,7 @@ bool JsonCppSerializer::serialize(const dap::any& v) { if (v.is()) { *json = (bool)v.get(); } else if (v.is()) { - *json = (int64_t)v.get(); + *json = (Json::LargestInt)v.get(); } else if (v.is()) { *json = (double)v.get(); } else if (v.is()) {