Changed strlen(data_buffer) to len

This commit is contained in:
RobinVdB8
2023-11-26 17:15:22 +01:00
parent 5600aa20f3
commit 752ada6867

View File

@@ -160,7 +160,7 @@ static void mqtt_incoming_data_cb(void* arg, const uint8_t* data, uint16_t len,
LOG_INFO(TAG, "incoming data on input/setImage: %s.", data_buffer);
lcd_clear_images();
lcd_set_bg_color_layer0(bgcolor);
if (strlen(data_buffer) >= 3) {
if (len >= 3) {
if (data_buffer[len - 3] == 'b') {
lcd_draw_img_from_fs((const char*)data_buffer, xpos, ypos);
}