Incorrect delete fix.

This commit is contained in:
Blaz Kristan 2021-12-21 18:16:25 +01:00
parent 8bd716c056
commit 84624666ce

View File

@ -613,7 +613,7 @@ void WS2812FX::restartRuntime() {
}
void WS2812FX::resetSegments() {
for (uint8_t i = 0; i < MAX_NUM_SEGMENTS; i++) if (_segments[i].name) delete _segments[i].name;
for (uint8_t i = 0; i < MAX_NUM_SEGMENTS; i++) if (_segments[i].name) delete[] _segments[i].name;
mainSegment = 0;
memset(_segments, 0, sizeof(_segments));
//memset(_segment_runtimes, 0, sizeof(_segment_runtimes));