From 39fda6a6425a459473e5fd6c51e47a946ef0a1f5 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Thu, 1 Jul 2021 22:55:30 -1000 Subject: [PATCH] Case-insensitive enums for runtime settings --- Grbl_Esp32/src/Configuration/RuntimeSetting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Grbl_Esp32/src/Configuration/RuntimeSetting.cpp b/Grbl_Esp32/src/Configuration/RuntimeSetting.cpp index 69738805..f0fa3f6b 100644 --- a/Grbl_Esp32/src/Configuration/RuntimeSetting.cpp +++ b/Grbl_Esp32/src/Configuration/RuntimeSetting.cpp @@ -58,7 +58,7 @@ namespace Configuration { if (newValue_ == nullptr) { grbl_sendf(out_->client(), "$%s=%s\r\n", setting_, value ? "true" : "false"); } else { - value = (!strcmp(newValue_, "true")); + value = (!strcasecmp(newValue_, "true")); } } } @@ -109,7 +109,7 @@ namespace Configuration { } } else { for (; e->name; ++e) { - if (!strcmp(newValue_, e->name)) { + if (!strcasecmp(newValue_, e->name)) { value = e->value; return; }