From 50d489d3c102db5519e7f671912213e1b8c75446 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 5 Mar 2023 14:32:20 +0100 Subject: [PATCH] use safer strcmp() instead of comparing pointers --- src/emsdevice.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 5302d3f37..c525f7297 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -1050,8 +1050,7 @@ void EMSdevice::generate_values_web_customization(JsonArray & output) { void EMSdevice::set_climate_minmax(uint8_t tag, int16_t min, uint16_t max) { for (auto & dv : devicevalues_) { - // TODO check if pointer reference is safe. strcpy better? - if (dv.tag == tag && dv.short_name == FL_(haclimate[0])) { + if (dv.tag == tag && (strcmp(dv.short_name, FL_(haclimate[0])) == 0)) { if (dv.min != min || dv.max != max) { dv.min = min; dv.max = max;