Skip to content

Commit 23dbd3d

Browse files
committed
increase buffer size
1 parent 065e98c commit 23dbd3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RCMv3/websiteserver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void startWebServer()
218218
prefs.begin("uiSettings", true, nvsPartition);
219219
if (prefs.isKey("uidata")) {
220220
size_t len = prefs.getBytesLength("uidata"); // Preferences library allows long byte arrays but limits strings
221-
char buf[len];
221+
char buf[len+1];
222222
prefs.getBytes("uidata", buf, len);
223223
request->send(200, "application/json", buf);
224224
} else {
@@ -247,7 +247,7 @@ void startWebServer()
247247
prefs.begin("miscConfigInfo", true, nvsPartition);
248248
if (prefs.isKey("miscConfigInfo")) {
249249
size_t len = prefs.getBytesLength("miscConfigInfo"); // Preferences library allows long byte arrays but limits strings
250-
char buf[len];
250+
char buf[len+1];
251251
prefs.getBytes("miscConfigInfo", buf, len);
252252
request->send(200, "application/json", buf);
253253
} else {

0 commit comments

Comments
 (0)