Changed strlen(data_buffer) to len
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user