From 1e773ba9ab213ef6a61ef3150c1b48118304571b Mon Sep 17 00:00:00 2001 From: Jonathan Schwartz Date: Wed, 10 May 2023 23:18:04 +0000 Subject: [PATCH] Communication: Fix loopLimit when parsing SupportedFeaturesPacket --- communication/packet/supportedfeaturespacket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communication/packet/supportedfeaturespacket.cpp b/communication/packet/supportedfeaturespacket.cpp index b317ce5..a396212 100644 --- a/communication/packet/supportedfeaturespacket.cpp +++ b/communication/packet/supportedfeaturespacket.cpp @@ -29,7 +29,7 @@ std::shared_ptr SupportedFeaturesPacket::DecodeToMessa if(bytes.size() < expectedSize) { return msg; // Empty } - unsigned int loopLimit = std::min(response.numValidBits, NumSupportedFeaturesFields); + unsigned int loopLimit = std::min(response.numValidBits, static_cast(SupportedFeature::numSupportedFeatures)); for(unsigned int i = 0; i < loopLimit; ++i) { uint32_t wordOffset = i / 32; uint32_t bitOffset = i % 32;