From 23f9d942df5cff3f5cdbc68c8009ff02ed07a38e Mon Sep 17 00:00:00 2001 From: Cervenka Dusan Date: Mon, 4 Mar 2024 12:07:32 +0100 Subject: [PATCH] findUbxMessageLen was returning wrong length in case startIdx!=0 Signed-off-by: Cervenka Dusan --- lang/cpp/src/parseUbxMessageBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/cpp/src/parseUbxMessageBase.cpp b/lang/cpp/src/parseUbxMessageBase.cpp index e58ac7a..5498108 100644 --- a/lang/cpp/src/parseUbxMessageBase.cpp +++ b/lang/cpp/src/parseUbxMessageBase.cpp @@ -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); } }