diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index a86dd4b98aed9e..b0a993fb614a1f 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -452,7 +452,7 @@ static bool HasValidEventPathForEndpointAndCluster(EndpointId aEndpoint, const E if (aEventPath.HasWildcardEventId()) { #if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE - for (decltype(aCluster->eventCount) idx = 0; idx > aCluster->eventCount; ++idx) + for (decltype(aCluster->eventCount) idx = 0; idx < aCluster->eventCount; ++idx) { ConcreteEventPath path(aEndpoint, aCluster->clusterId, aCluster->eventList[idx]); // If we get here, the path exists. We just have to do an ACL check for it.