From c6ecad1b3a8db814676d7186efa421f01a1cf9fd Mon Sep 17 00:00:00 2001 From: tablatronix Date: Tue, 7 Aug 2018 13:55:45 -0500 Subject: [PATCH] fixes #678 --- WiFiManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 732fef8..faefd4c 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -25,7 +25,7 @@ uint8_t WiFiManager::_lastconxresulttmp = WL_IDLE_STATUS; WiFiManagerParameter::WiFiManagerParameter(const char *custom) { _id = NULL; _placeholder = NULL; - _length = 0; + _length = 1; _value = NULL; _labelPlacement = WFM_LABEL_BEFORE; _customHTML = custom; @@ -63,7 +63,7 @@ WiFiManagerParameter::~WiFiManagerParameter() { } void WiFiManagerParameter::setValue(const char *defaultValue, int length) { - _length = length; + _length = length; int deflength = strlen(defaultValue); // length actual // use the defult length if it's longer, // @todo consider it might be useful to fail, so user knows they were wrong