Skip to content

Commit a2bc976

Browse files
authored
Merge pull request #65 from igrr/fix-vertical-line
Fix calculation of final drawBit in drawVerticalLine
2 parents 763a671 + 3759e51 commit a2bc976

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)