Cava: fix overflowing array

This commit is contained in:
Sébastien Atoch 2025-07-25 17:37:12 -04:00
parent 2dc106db5f
commit b78b7df66c

View file

@ -67,9 +67,9 @@ Scope {
process.index = 0; process.index = 0;
} }
for (let i = 0; i < data.length; i += 1) { for (let i = 0; i < data.length; i += 1) {
newValues[i + process.index] = Math.min(data.charCodeAt(i), 128) / 128; newValues[process.index] = Math.min(data.charCodeAt(i), 128) / 128;
process.index = (process.index+1) % count;
} }
process.index += data.length;
values = newValues; values = newValues;
} }
} }