This commit is contained in:
parent
d6b2c1d81e
commit
7c58d9c569
5
support/3rd_party/include/utils/file.hpp
vendored
5
support/3rd_party/include/utils/file.hpp
vendored
@ -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<const unsigned char *>(data.dump().c_str()),
|
||||
offset, total_written);
|
||||
auto str_data = data.dump();
|
||||
return write_(reinterpret_cast<const unsigned char *>(str_data.c_str()),
|
||||
data.size(), offset, total_written);
|
||||
}
|
||||
#endif // defined(PROJECT_ENABLE_JSON)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user