Skip to content

Commit 132da60

Browse files
seifemarcelstoer
authored andcommitted
drawStringInternal: fix width/height confusion
1 parent f19b775 commit 132da60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OLEDDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ void OLEDDisplay::drawStringInternal(int16_t xMove, int16_t yMove, char* text, u
577577

578578
// Don't draw anything if it is not on the screen.
579579
if (xMove + textWidth < 0 || xMove > this->width() ) {return;}
580-
if (yMove + textHeight < 0 || yMove > this->width() ) {return;}
580+
if (yMove + textHeight < 0 || yMove > this->height()) {return;}
581581

582582
for (uint16_t j = 0; j < textLength; j++) {
583583
int16_t xPos = xMove + cursorX;

0 commit comments

Comments
 (0)