Skip to content

Commit

Permalink
fix non ascii string serialization (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz-h committed Feb 11, 2023
1 parent f41eea0 commit f627949
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IO/Archive/OStreamArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void Satisfactory3DMap::OStreamArchive::serializeString(std::string& s) {
} else {
std::u16string u16str = std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t>{}.from_bytes(s);
const int32_t size = static_cast<int32_t>(u16str.size()) + 1;
write(size);
write(-size);
serialize(u16str.data(), size * sizeof(std::u16string ::value_type));
}
}

0 comments on commit f627949

Please sign in to comment.