diff --git a/src/apps/mqtt/mqtt.c b/src/apps/mqtt/mqtt.c index c09642be..096215e2 100644 --- a/src/apps/mqtt/mqtt.c +++ b/src/apps/mqtt/mqtt.c @@ -711,7 +711,7 @@ mqtt_message_received(mqtt_client_t *client, u8_t fixed_hdr_len, u16_t length, u u16_t payload_length = length; u8_t qos = MQTT_CTL_PACKET_QOS(client->rx_buffer[0]); - if (client->msg_idx == (fixed_hdr_len + length)) { + if (client->msg_idx == (u32_t)(fixed_hdr_len + length)) { /* First publish message frame. Should have topic and pkt id*/ size_t var_hdr_payload_bufsize = sizeof(client->rx_buffer) - fixed_hdr_len; u8_t *topic;