diff --git a/OLEDDisplay.cpp b/OLEDDisplay.cpp index 3a8e3e228277b90d860750bf568cbc841a2f9851..2161d3e34ca0c957c181de60cc9a20da4d03f4d9 100644 --- a/OLEDDisplay.cpp +++ b/OLEDDisplay.cpp @@ -278,7 +278,7 @@ void OLEDDisplay::drawVerticalLine(int16_t x, int16_t y, int16_t length) { } if (length > 0) { - drawBit = (1 << length & 7) - 1; + drawBit = (1 << (length & 7)) - 1; switch (color) { case WHITE: *bufferPtr |= drawBit; break; case BLACK: *bufferPtr &= drawBit; break;