Skip to content

Commit 19c3e83

Browse files
committed
Left-shift additional bytes by 'neededBits - remainingBits' instead of 'kByteNBits - remainingBits'
1 parent 0a00d22 commit 19c3e83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qwiic_grssd1306.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ void QwGrSSD1306::drawBitmap(uint8_t x0, uint8_t y0, uint8_t dst_width,
880880

881881
if (remainingBits) // more data to add from the next byte in this column
882882
bmp_data |= (pBitmap[bmp_width * (bmpPage + 1) + bmp_x] & bmp_mask[1])
883-
<< (kByteNBits - remainingBits);
883+
<< (neededBits - remainingBits);
884884

885885
// Write the bmp data to the graphics buffer - using current write op.
886886
// Note, if the location in the buffer didn't start at bit 0, we shift

0 commit comments

Comments
 (0)