From ca084dcfe8d33487c0a5389a740b56987d4f7876 Mon Sep 17 00:00:00 2001 From: Robby Candra Date: Wed, 28 Aug 2019 14:49:21 +0700 Subject: [PATCH] Switch col vs row variable name (#15072) --- Marlin/src/lcd/ultralcd.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index b25907a622..a6078e0f5b 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -266,17 +266,17 @@ millis_t next_button_update_ms; void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; - uint8_t row = 0, col = 0; + uint8_t col = 0, row = 0; if (!string && plen + slen <= LCD_WIDTH) { - row = (LCD_WIDTH - plen - slen) / 2; - col = LCD_HEIGHT > 3 ? 1 : 0; + col = (LCD_WIDTH - plen - slen) / 2; + row = LCD_HEIGHT > 3 ? 1 : 0; } - wrap_string_P(row, col, pref, true); + wrap_string_P(col, row, pref, true); if (string) { - if (row) { row = 0; col++; } // Move to the start of the next line - wrap_string(row, col, string); + if (col) { col = 0; row++; } // Move to the start of the next line + wrap_string(col, row, string); } - if (suff) wrap_string_P(row, col, suff); + if (suff) wrap_string_P(col, row, suff); } #endif // HAS_LCD_MENU