Fix setValue length: pass buffer max not strlen so maxlength=63 in portal

This commit is contained in:
2026-06-29 00:33:41 +02:00
parent 11477ae68f
commit d23e7f7305
+2 -2
View File
@@ -399,7 +399,7 @@ static void factoryReset(bool clearWifi) {
Serial.printf("[BOOT] factory reset triggered (clearWifi=%d)!\n", clearWifi);
strlcpy(hostname, HOSTNAME_DEFAULT, sizeof(hostname));
hostnameParam.setValue(hostname, strlen(hostname));
hostnameParam.setValue(hostname, sizeof(hostname) - 1);
authCfg.enabled = false;
authCfg.pass[0] = '\0';
@@ -455,7 +455,7 @@ void setup() {
LittleFS.begin(true);
loadConfig();
hostnameParam.setValue(hostname, strlen(hostname));
hostnameParam.setValue(hostname, sizeof(hostname) - 1);
int resetCount = incrementResetCount();