Skip to content

Commit

Permalink
fix: fix initializer_list invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Jun 23, 2024
1 parent eb0f56f commit 361c3a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mc/nbt/detail/SnbtDumpImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ toDumpString(std::string const& str, fmt::color defaultc, std::string const& def
res = str;
} else {
try {
res = nlohmann::json{str}.dump(
res = nlohmann::json(std::move(str)).dump(
-1,
' ',
(bool)(format & SnbtFormat::ForceAscii),
nlohmann::json::error_handler_t::strict
);
res = res.substr(1, res.size() - 2);
} catch (...) {
base64 = true;
res = "\"" + ll::base64_utils::encode(str) + "\"";
Expand Down

0 comments on commit 361c3a1

Please sign in to comment.