Skip to content

Commit

Permalink
findUbxMessageLen was returning wrong length in case startIdx!=0
Browse files Browse the repository at this point in the history
Signed-off-by: Cervenka Dusan <[email protected]>
  • Loading branch information
Hadatko committed Mar 4, 2024
1 parent 33f88d5 commit 23f9d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/cpp/src/parseUbxMessageBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int32_t ParseUbxMessageBase::findUbxMessageLen(const uint8_t *buf, uint16_t len,
{
if ((startIdx + IDX_LEN_H + 1U) <= len)
{
ret = startIdx + SerializeCommon::UbxControlBytesSize + buf[startIdx + IDX_LEN_L] + (buf[startIdx + IDX_LEN_H] << 8U);
ret = SerializeCommon::UbxControlBytesSize + buf[startIdx + IDX_LEN_L] + (buf[startIdx + IDX_LEN_H] << 8U);
}
}

Expand Down

0 comments on commit 23f9d94

Please sign in to comment.