Cava: fix overflowing array
This commit is contained in:
parent
2dc106db5f
commit
b78b7df66c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue