Skip to content

Commit e2aa245

Browse files
committed
Fix off by 1 error
Characters are printed as 5 font data lines and 1 separator line. With the wrong left clip test, characters at x=-5*size would not clear x=0.
1 parent 1ca9286 commit e2aa245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_GFX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void Adafruit_GFX::drawChar(int16_t x, int16_t y, unsigned char c,
375375

376376
if((x >= _width) || // Clip right
377377
(y >= _height) || // Clip bottom
378-
((x + 5 * size - 1) < 0) || // Clip left
378+
((x + 6 * size - 1) < 0) || // Clip left
379379
((y + 8 * size - 1) < 0)) // Clip top
380380
return;
381381

0 commit comments

Comments
 (0)