From 4f6eb8b1618a8f1f929eeaab76d291c8dd4490d4 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:24:18 +0200 Subject: [PATCH] prevent array bounds violation + don't use dynamic array for heights[] - dynamic arrays are using malloc() -> heap frag. --- wled00/FX.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 599dea0d..5b367e84 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -8420,7 +8420,7 @@ uint16_t mode_GEQLASER(void) { } uint8_t *fftResult = (uint8_t*)um_data->u_data[2]; - uint8_t heights[NUM_BANDS] = { 0 }; + uint8_t heights[NUM_GEQ_CHANNELS] = { 0 }; for (int i=0; i0) ? heights[i-1] : 0; y <= heights[i]; y++) { // don't bother drawing what we'll hide anyway SEGMENT.drawLine(linex,rows-y-1,*projector,horizon,ledColorTemp,false,distance); // left side perspective }