From 6ea51a7d98a9e333384c9e626c2f16c58280df54 Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Mon, 29 Jul 2024 17:39:10 -0700 Subject: [PATCH] Fix loop iteration for checking subscription QoS --- source/core_mqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core_mqtt.c b/source/core_mqtt.c index 943e08e19..deba63fda 100644 --- a/source/core_mqtt.c +++ b/source/core_mqtt.c @@ -1840,7 +1840,7 @@ static MQTTStatus_t validateSubscribeUnsubscribeParams( const MQTTContext_t * pC { for( iterator = 0; iterator < subscriptionCount; iterator++ ) { - if( pSubscriptionList->qos > MQTTQoS0 ) + if( pSubscriptionList[ iterator ].qos > MQTTQoS0 ) { LogError( ( "The incoming publish record list is not " "initialised for QoS1/QoS2 records. Please call "