Fix wrong temp variable access in config validation

This commit is contained in:
2026-03-20 15:10:49 +01:00
parent a8e2f101df
commit e589f46d2b

View File

@@ -348,7 +348,7 @@ bool Config::setValue(const char* key, const char* value) {
LOGW(TAG, "not a number");
break;
}
if (temp > 255) {
if (byte_temp > 255) {
LOGW(TAG, "byte out of range");
break;
}
@@ -362,7 +362,7 @@ bool Config::setValue(const char* key, const char* value) {
LOGW(TAG, "not a number");
break;
}
if (temp < INT16_MIN || temp > INT16_MAX) {
if (int_temp < INT16_MIN || int_temp > INT16_MAX) {
LOGW(TAG, "short out of range");
break;
}
@@ -376,7 +376,7 @@ bool Config::setValue(const char* key, const char* value) {
LOGW(TAG, "not a number");
break;
}
if (temp < INT32_MIN || temp > INT32_MAX) {
if (int_temp < INT32_MIN || int_temp > INT32_MAX) {
LOGW(TAG, "integer out of range");
break;
}