--- libgig/trunk/src/Serialization.cpp 2020/05/23 19:55:32 3777 +++ libgig/trunk/src/Serialization.cpp 2020/05/24 11:20:11 3778 @@ -1346,12 +1346,16 @@ static String _encode(const DataType& type) { String s; + + // Srx v1.0 format (mandatory): s += _encodeBlob(type.baseTypeName()); s += _encodeBlob(type.customTypeName()); - if (!type.customTypeName2().empty()) - s += _encodeBlob(type.customTypeName2()); s += _encodeBlob(ToString(type.size())); s += _encodeBlob(ToString(type.isPointer())); + + // Srx v1.1 format: + s += _encodeBlob(type.customTypeName2()); + return _encodeBlob(s); } @@ -1678,12 +1682,17 @@ end = blob.end; DataType type; + + // Srx v1.0 format (mandatory): type.m_baseTypeName = _popStringBlob(p, end); type.m_customTypeName = _popStringBlob(p, end); - if (type.isMap()) - type.m_customTypeName2 = _popStringBlob(p, end); type.m_size = _popIntBlob(p, end); type.m_isPointer = _popIntBlob(p, end); + + // Srx v1.1 format (optional): + if (p < end) + type.m_customTypeName2 = _popStringBlob(p, end); + return type; }