1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Fixing bug in LiquidCrystal::setCursor() for row == numrows.

http://code.google.com/p/arduino/issues/detail?id=671
This commit is contained in:
David A. Mellis 2011-10-10 12:35:36 -04:00
parent e7ff928762
commit f684321850

View File

@ -173,7 +173,7 @@ void LiquidCrystal::home()
void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
{
int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
if ( row > _numlines ) {
if ( row >= _numlines ) {
row = _numlines-1; // we count rows starting w/0
}