mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user