From 4c24d173f9b2905ea79f39711fdd3b6ab10bd3fb Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Tue, 30 Jul 2024 07:47:06 +0000 Subject: [PATCH] Fix loop iteration for checking subscription QoS (#302) --- 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 "