diff --git a/src/cpp/fastdds/core/policy/ParameterList.cpp b/src/cpp/fastdds/core/policy/ParameterList.cpp index badacbea420..e59da3520b2 100644 --- a/src/cpp/fastdds/core/policy/ParameterList.cpp +++ b/src/cpp/fastdds/core/policy/ParameterList.cpp @@ -146,7 +146,7 @@ bool ParameterList::read_guid_from_cdr_msg( valid = true; valid &= fastrtps::rtps::CDRMessage::readUInt16(&msg, &pid); valid &= fastrtps::rtps::CDRMessage::readUInt16(&msg, &plength); - if ((pid == PID_SENTINEL) || !valid) + if (!valid || (pid == PID_SENTINEL)) { break; }