diff --git a/src/sampled_values/sv_publisher.c b/src/sampled_values/sv_publisher.c index d5ee8d05..02dfee64 100644 --- a/src/sampled_values/sv_publisher.c +++ b/src/sampled_values/sv_publisher.c @@ -367,7 +367,7 @@ SVPublisher_ASDU_getEncodedSize(SVPublisher_ASDU self) encodedSize += 4; /* sample */ - encodedSize += 2; + encodedSize += (1 + BerEncoder_determineLengthSize(self->dataSize)); encodedSize += self->dataSize; /* smpMod */