Fix issue - SSD1306_DrawPixel / replace && by || in out of range

Thanks to Bill Pringlemeir
This commit is contained in:
Marián 2023-06-19 09:57:05 +02:00 committed by GitHub
parent ce135fab47
commit c07b04bac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,7 +519,7 @@ uint8_t SSD1306_DrawPixel (uint8_t x, uint8_t y)
uint8_t pixel = 0;
// if out of range
if ((x > MAX_X) && (y > MAX_Y)) {
if ((x > MAX_X) || (y > MAX_Y)) {
// out of range
return SSD1306_ERROR;
}