Work around incorrect wchar_t text serialization

`std::char_traits<wchar_t>::length()` would return the wrong length for
a wide string under Wine, and thus also for `String128`. This would
cause parts of the strings to get cut off. As a workaround we'll just
serialize the entire container including all null bytes at the end.
This commit is contained in:
Robbert van der Helm
2021-02-02 15:43:53 +01:00
parent 81d401f06a
commit 391206eea8
5 changed files with 19 additions and 12 deletions
@@ -188,7 +188,7 @@ namespace Steinberg {
namespace Vst {
template <typename S>
void serialize(S& s, IContextMenuItem& item) {
s.text2b(item.name);
s.container2b(item.name);
s.value4b(item.tag);
s.value4b(item.flags);
}