Browse Source

Fix an issue with shifted LCD lines

Scott Lahteine 8 years ago
parent
commit
ff6b23cb0f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -223,7 +223,7 @@ uint8_t lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; // Set when the LCD needs to
223 223
     static int8_t _countedItems = 0; \
224 224
     int8_t encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; \
225 225
     if (_countedItems > 0 && encoderLine >= _countedItems - LIMIT) { \
226
-      encoderLine = _countedItems - LIMIT; \
226
+      encoderLine = max(0, _countedItems - LIMIT); \
227 227
       encoderPosition = encoderLine * (ENCODER_STEPS_PER_MENU_ITEM); \
228 228
     }
229 229
 

Loading…
Cancel
Save