changed: clear string, do not assert on it being empty

causes issues when deserializing default init classes
with values for string members.
This commit is contained in:
Arne Morten Kvarving
2020-03-13 09:29:05 +01:00
parent fa3cccdd64
commit e6a117abec

View File

@@ -3408,7 +3408,7 @@ void unpack(std::string& str, std::vector<char>& buffer, int& position,
unpack(length, buffer, position, comm);
std::vector<char> cStr(length, '\0');
unpack(cStr.data(), length, buffer, position, comm);
assert(str.empty());
str.clear();
str.append(cStr.data());
}