Skip to content

Commit 6f35889

Browse files
committed
fixed check when computing root blocklength to return current blocklength value when hitting a group
1 parent f046d20 commit 6f35889

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main/java/uk/co/real_logic/sbe/xml/Message.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ private int computeMessageRootBlockLength()
365365
{
366366
if (field.groupFields() != null)
367367
{
368-
return field.computedOffset();
368+
return blockLength;
369369
}
370370
else if (field.type() != null)
371371
{
@@ -387,7 +387,7 @@ private void validateBlockLength(final Node node, final long specifiedBlockLengt
387387
{
388388
if (0 != specifiedBlockLength && computedBlockLength > specifiedBlockLength)
389389
{
390-
handleError(node, "specified blockLength provides insufficient space");
390+
handleError(node, "specified blockLength provides insufficient space " + computedBlockLength + " > " + specifiedBlockLength);
391391
}
392392
}
393393
}

0 commit comments

Comments
 (0)