瀏覽代碼

Fix an issue with shifted LCD lines

Scott Lahteine 8 年之前
父節點
當前提交
ff6b23cb0f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/ultralcd.cpp 查看文件

@@ -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…
取消
儲存