Merge branch 'master' into development

This commit is contained in:
Shawn A
2018-02-06 11:28:51 -06:00
+2 -2
View File
@@ -42,11 +42,11 @@ void WiFiManagerParameter::init(const char *id, const char *placeholder, const c
_length = length;
_labelPlacement = labelPlacement;
_value = new char[length + 1];
for (int i = 0; i < length; i++) {
for (int i = 0; i < length + 1; i++) {
_value[i] = 0;
}
if (defaultValue != NULL) {
strncpy(_value, defaultValue, length+1); // length+1 due to null terminated string
strncpy(_value, defaultValue, length + 1); // length+1 due to null terminated string
}
_customHTML = custom;