Skip to content

Commit 3759e51

Browse files
committed
Fix operator precedence error in drawVerticalLine
1 parent 763a671 commit 3759e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OLEDDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void OLEDDisplay::drawVerticalLine(int16_t x, int16_t y, int16_t length) {
278278
}
279279

280280
if (length > 0) {
281-
drawBit = (1 << length & 7) - 1;
281+
drawBit = (1 << (length & 7)) - 1;
282282
switch (color) {
283283
case WHITE: *bufferPtr |= drawBit; break;
284284
case BLACK: *bufferPtr &= drawBit; break;

0 commit comments

Comments
 (0)