-   Notifications  
You must be signed in to change notification settings  - Fork 556
 
Closed
Description
From CppGenerator.java:
 "template<typename CharT, typename Traits>\n" + "friend std::basic_ostream<CharT, Traits> & operator << (\n" + " std::basic_ostream<CharT, Traits> &builder, %1$s _writer)\n" + "{\n" + " %1$s writer(_writer.m_buffer, _writer.m_offset,\n" + " _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);\n" + I think the problem here is use of sbeBlockLength which is the decoder's block length and not the message's block length, which means if the block length has changed between the two versions then we will misinterpret the message. In contrast, we use the message's schema version via m_actingVersion, instead of the decoder's schema version.
Is there a simple way to fix this? Or - if by design - at least to compare m_actingVersion against sbeSchemaVersion to detect misuse of operator<<?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels