Skip to content

Commit 5f6f263

Browse files
authored
Merge pull request #50 from squix78/fix-non-drawable-detection
Fix detection of non drawable characters
2 parents e9ea480 + 1aa2ac3 commit 5f6f263

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
@@ -362,7 +362,7 @@ void OLEDDisplay::drawStringInternal(int16_t xMove, int16_t yMove, char* text, u
362362
byte currentCharWidth = pgm_read_byte( fontData + JUMPTABLE_START + charCode * JUMPTABLE_BYTES + JUMPTABLE_WIDTH); // Width
363363

364364
// Test if the char is drawable
365-
if (msbJumpToChar != 255 && lsbJumpToChar != 255) {
365+
if (!(msbJumpToChar == 255 && lsbJumpToChar == 255)) {
366366
// Get the position of the char data
367367
uint16_t charDataPosition = JUMPTABLE_START + sizeOfJumpTable + ((msbJumpToChar << 8) + lsbJumpToChar);
368368
drawInternal(xPos, yPos, currentCharWidth, textHeight, fontData, charDataPosition, charByteSize);

0 commit comments

Comments
 (0)