mirror of
https://github.com/nopnop2002/esp-idf-ssd1306.git
synced 2024-10-03 18:18:47 -04:00
fix issue #34
This commit is contained in:
parent
97d775a6cf
commit
05b2d5d185
@ -169,7 +169,7 @@ void i2c_display_image(SSD1306_t * dev, int page, int seg, uint8_t * images, int
|
||||
}
|
||||
|
||||
uint8_t *out_buf;
|
||||
out_buf = malloc(width + 1);
|
||||
out_buf = malloc(width < 4 ? 4 : width + 1);
|
||||
if (out_buf == NULL) {
|
||||
ESP_LOGE(TAG, "malloc fail");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user