Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-12-03 21:40:56 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-12-03 21:40:56 +0300
commit9f570b7d88ee407e9a76659a6aaadc076b475795 (patch)
treeae129244ce980f5160f79b201642369668652a78 /src/Display
parent3ffdae4ccfb9b9d45b0be6c411468ab7298526c9 (diff)
Fixed crash when configuring a 12864 display with no SD card mounted
Diffstat (limited to 'src/Display')
-rw-r--r--src/Display/Menu.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/Display/Menu.cpp b/src/Display/Menu.cpp
index 3677680c..11fb3242 100644
--- a/src/Display/Menu.cpp
+++ b/src/Display/Menu.cpp
@@ -110,6 +110,7 @@ void Menu::LoadFixedMenu() noexcept
{
displayingFixedMenu = true;
numNestedMenus = 0;
+ commandBufferIndex = 0;
rowOffset = 0;
currentMargin = 0;
lcd.Clear();
@@ -122,25 +123,8 @@ void Menu::LoadFixedMenu() noexcept
char acLine1[] = "text R3 C5 F0 T\"No SD Card Found\"";
char acLine2[] = "button R15 C5 F0 T\"Mount SD\" A\"M21\"";
- const char *errMsg = ParseMenuLine(acLine1);
- if (nullptr != errMsg)
- {
- LoadError(errMsg, 1);
- }
- if (commandBufferIndex == sizeof(commandBuffer))
- {
- LoadError("|Menu buffer full", 1);
- }
-
- errMsg = ParseMenuLine(acLine2);
- if (nullptr != errMsg)
- {
- LoadError(errMsg, 2);
- }
- if (commandBufferIndex == sizeof(commandBuffer))
- {
- LoadError("|Menu buffer full", 2);
- }
+ (void)ParseMenuLine(acLine1);
+ (void)ParseMenuLine(acLine2);
}
// Display a M291 message box