diff options
Diffstat (limited to 'src/drivers/St7789.cpp')
-rw-r--r-- | src/drivers/St7789.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/St7789.cpp b/src/drivers/St7789.cpp index 39218e77..0f1dc02e 100644 --- a/src/drivers/St7789.cpp +++ b/src/drivers/St7789.cpp @@ -140,8 +140,9 @@ void St7789::Uninit() { } void St7789::DrawPixel(uint16_t x, uint16_t y, uint32_t color) { - if ((x < 0) || (x >= Width) || (y < 0) || (y >= Height)) + if (x >= Width || y >= Height) { return; + } SetAddrWindow(x, y, x + 1, y + 1); |