diff --git a/include/ehs/Serializer.h b/include/ehs/Serializer.h index 3de251c..e3e1c12 100644 --- a/include/ehs/Serializer.h +++ b/include/ehs/Serializer.h @@ -405,7 +405,9 @@ namespace ehs inSize++; N bSize = sizeof(T) * inSize; - N bSizeN = sizeof(T) * (inSize + 1); + N bSizeN = bSize; + if (!sizeKnown) + bSizeN += sizeof(T); if (bSizeN > size - offset) {