Merge pull request #35 from gralpli/master

Fix issue #34
This commit is contained in:
nopnop2002 2024-09-27 17:42:04 +09:00 committed by GitHub
commit d5b522174a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,7 +169,7 @@ void i2c_display_image(SSD1306_t * dev, int page, int seg, uint8_t * images, int
} }
uint8_t *out_buf; uint8_t *out_buf;
out_buf = malloc(width + 1); out_buf = malloc(width < 4 ? 4 : width + 1);
if (out_buf == NULL) { if (out_buf == NULL) {
ESP_LOGE(TAG, "malloc fail"); ESP_LOGE(TAG, "malloc fail");
return; return;