Skip to content

Commit 68e32a1

Browse files
authored
Update WiFiManager.cpp
tzapu#392 Increased size of parLength to 5 so the custom parameter length variable can be up to 9999 long.
1 parent cee18a7 commit 68e32a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WiFiManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void WiFiManager::handleWifi(boolean scan) {
485485
}
486486

487487
page += FPSTR(HTTP_FORM_START);
488-
char parLength[2];
488+
char parLength[5];
489489
// add the extra parameters to the form
490490
for (int i = 0; i < _paramsCount; i++) {
491491
if (_params[i] == NULL) {
@@ -497,7 +497,7 @@ void WiFiManager::handleWifi(boolean scan) {
497497
pitem.replace("{i}", _params[i]->getID());
498498
pitem.replace("{n}", _params[i]->getID());
499499
pitem.replace("{p}", _params[i]->getPlaceholder());
500-
snprintf(parLength, 2, "%d", _params[i]->getValueLength());
500+
snprintf(parLength, 5, "%d", _params[i]->getValueLength());
501501
pitem.replace("{l}", parLength);
502502
pitem.replace("{v}", _params[i]->getValue());
503503
pitem.replace("{c}", _params[i]->getCustomHTML());

0 commit comments

Comments
 (0)