char array would cut off strings that were too small in size

This commit is contained in:
Alex Tudorache
2016-01-18 16:34:25 +02:00
parent 0b06e465ce
commit 823767cb8b
2 changed files with 8 additions and 13 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ WiFiManagerParameter::WiFiManagerParameter(const char *id, const char *placehold
_id = id;
_placeholder = placeholder;
_length = length;
_value = new char[length];
_value = new char[length+1];
for (int i = 0; i < length; i++) {
_value[i] = 0;
}