From 7c58d9c569180bb9730934c17eecf1f6640abbe8 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 2 Aug 2024 14:06:25 -0500 Subject: [PATCH] updated build system --- support/3rd_party/include/utils/file.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/support/3rd_party/include/utils/file.hpp b/support/3rd_party/include/utils/file.hpp index 541cba16..6513d41e 100644 --- a/support/3rd_party/include/utils/file.hpp +++ b/support/3rd_party/include/utils/file.hpp @@ -77,8 +77,9 @@ public: #if defined(PROJECT_ENABLE_JSON) [[nodiscard]] auto write(const nlohmann::json &data, std::uint64_t offset, std::size_t *total_written = nullptr) -> bool { - return write_(reinterpret_cast(data.dump().c_str()), - offset, total_written); + auto str_data = data.dump(); + return write_(reinterpret_cast(str_data.c_str()), + data.size(), offset, total_written); } #endif // defined(PROJECT_ENABLE_JSON)