File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments