Protect against neg x drawing
This commit is contained in:
@@ -52,7 +52,7 @@ void lcdPutPattern(coord_t x, coord_t y, const uint8_t * pattern, uint8_t width,
|
|||||||
assert(lines <= 5);
|
assert(lines <= 5);
|
||||||
|
|
||||||
for (int8_t i=0; i<width+2; i++) {
|
for (int8_t i=0; i<width+2; i++) {
|
||||||
if (x<LCD_W) {
|
if (x >= 0 && x<LCD_W) {
|
||||||
uint8_t b[5] = { 0 };
|
uint8_t b[5] = { 0 };
|
||||||
if (i==0) {
|
if (i==0) {
|
||||||
if (x==0 || !inv) {
|
if (x==0 || !inv) {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ void menuTextView(event_t event)
|
|||||||
#else
|
#else
|
||||||
// TODO?
|
// TODO?
|
||||||
#endif
|
#endif
|
||||||
lcdDrawText(LCD_W/2-strlen(getBasename(title))*FW/2, 0, getBasename(title));
|
lcdDrawText(LCD_W/2, 0, getBasename(title), CENTERED);
|
||||||
lcdInvertLine(0);
|
lcdInvertLine(0);
|
||||||
|
|
||||||
if (lines_count > LCD_LINES-1) {
|
if (lines_count > LCD_LINES-1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user