Skip to content

Invalid Encoded Length Generated in cpp code #595

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kdoherty2 opened this issue Oct 9, 2018 · 0 comments
Closed

Invalid Encoded Length Generated in cpp code #595

kdoherty2 opened this issue Oct 9, 2018 · 0 comments
Labels

Comments

@kdoherty2
Copy link

kdoherty2 commented Oct 9, 2018

SBE Tool v1.7.9

Bug: Generated code discrepancy between cpp and Java.

Given a fixed size string of 3 in the sbe xml schema, the sbe tool returns encoding length of 1 in CPP and 3 in Java.

Type Definition

<type name="liquidityCodeType" primitiveType="char" length="3" presence="required" semanticType="liquidityCode" />

Field Definition:

 <field name="liquidityCode" id="7" type="liquidityCodeType" presence="required" semanticType="liquidityCode" />
static SBE_CONSTEXPR std::size_t liquidityCodeEncodingLength() SBE_NOEXCEPT
{ return 1; } 
static SBE_CONSTEXPR std::uint64_t liquidityCodeLength() SBE_NOEXCEPT
{ return 3; }

 public static int liquidityCodeEncodingLength()
 { return 3; }

 public static int liquidityCodeLength()
 { return 3; } 
@kdoherty2 kdoherty2 changed the title SBE Tool v1.7.9 Invalid Encoded Length Generated in cpp code Invalid Encoded Length Generated in cpp code Oct 9, 2018
mjpt777 added a commit that referenced this issue Oct 9, 2018
@mjpt777 mjpt777 added the bug label Oct 9, 2018
@mjpt777 mjpt777 closed this as completed Oct 9, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants