Skip to content

Commit b47b2cc

Browse files
committed
[C++] Fix call to reset in wrapAndApplyHeader().
The message flyweight should only see buffer length minus the encoded length of the message header.
1 parent bb5f244 commit b47b2cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp/CppGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ private CharSequence generateMessageFlyweightCode(final String className, final
17141714
" reset(\n" +
17151715
" buffer + offset + MessageHeader::encodedLength(),\n" +
17161716
" 0,\n" +
1717-
" bufferLength,\n" +
1717+
" bufferLength - MessageHeader::encodedLength(),\n" +
17181718
" sbeBlockLength()\n," +
17191719
" sbeSchemaVersion());\n" +
17201720
" return *this;\n" +

0 commit comments

Comments
 (0)