Fix setValue length: pass buffer max not strlen so maxlength=63 in portal
This commit is contained in:
+2
-2
@@ -399,7 +399,7 @@ static void factoryReset(bool clearWifi) {
|
|||||||
Serial.printf("[BOOT] factory reset triggered (clearWifi=%d)!\n", clearWifi);
|
Serial.printf("[BOOT] factory reset triggered (clearWifi=%d)!\n", clearWifi);
|
||||||
|
|
||||||
strlcpy(hostname, HOSTNAME_DEFAULT, sizeof(hostname));
|
strlcpy(hostname, HOSTNAME_DEFAULT, sizeof(hostname));
|
||||||
hostnameParam.setValue(hostname, strlen(hostname));
|
hostnameParam.setValue(hostname, sizeof(hostname) - 1);
|
||||||
|
|
||||||
authCfg.enabled = false;
|
authCfg.enabled = false;
|
||||||
authCfg.pass[0] = '\0';
|
authCfg.pass[0] = '\0';
|
||||||
@@ -455,7 +455,7 @@ void setup() {
|
|||||||
LittleFS.begin(true);
|
LittleFS.begin(true);
|
||||||
|
|
||||||
loadConfig();
|
loadConfig();
|
||||||
hostnameParam.setValue(hostname, strlen(hostname));
|
hostnameParam.setValue(hostname, sizeof(hostname) - 1);
|
||||||
|
|
||||||
int resetCount = incrementResetCount();
|
int resetCount = incrementResetCount();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user