diff options
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r-- | cpp/src/slice2swift/Gen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp index 51febc811c6..03b8b97bb0b 100644 --- a/cpp/src/slice2swift/Gen.cpp +++ b/cpp/src/slice2swift/Gen.cpp @@ -549,12 +549,14 @@ Gen::TypesVisitor::visitStructStart(const StructPtr& p) if(p->isVariableLength()) { out << nl << "let pos = startSize()"; + out << nl << "write(v)"; + out << nl << "endSize(position: pos)"; } else { out << nl << "write(size: " << p->minWireSize() << ")"; + out << nl << "write(v)"; } - out << nl << "write(v)"; out << eb; out << eb; out << eb; |