mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Communication: Fix loopLimit when parsing SupportedFeaturesPacket
This commit is contained in:
@@ -29,7 +29,7 @@ std::shared_ptr<SupportedFeaturesMessage> SupportedFeaturesPacket::DecodeToMessa
|
|||||||
if(bytes.size() < expectedSize) {
|
if(bytes.size() < expectedSize) {
|
||||||
return msg; // Empty
|
return msg; // Empty
|
||||||
}
|
}
|
||||||
unsigned int loopLimit = std::min<unsigned int>(response.numValidBits, NumSupportedFeaturesFields);
|
unsigned int loopLimit = std::min<unsigned int>(response.numValidBits, static_cast<unsigned int>(SupportedFeature::numSupportedFeatures));
|
||||||
for(unsigned int i = 0; i < loopLimit; ++i) {
|
for(unsigned int i = 0; i < loopLimit; ++i) {
|
||||||
uint32_t wordOffset = i / 32;
|
uint32_t wordOffset = i / 32;
|
||||||
uint32_t bitOffset = i % 32;
|
uint32_t bitOffset = i % 32;
|
||||||
|
|||||||
Reference in New Issue
Block a user