summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CsUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rw-r--r--cpp/src/Slice/CsUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 8cccf50ddda..0c093af5e67 100644
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -1975,7 +1975,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".startSize();";
}
- else
+ else if(st->minWireSize() > 1)
{
out << nl << stream << ".writeSize(" << param << ".Value == null ? 1 : " << length << " * "
<< st->minWireSize() << " + (" << length << " > 254 ? 5 : 1));";
@@ -1995,7 +1995,7 @@ Slice::CsGenerator::writeOptionalSequenceMarshalUnmarshalCode(Output& out,
{
out << nl << stream << ".skip(4);";
}
- else
+ else if(st->minWireSize() > 1)
{
out << nl << stream << ".skipSize();";
}