mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 03:00:35 +00:00
Fix an off by one error in volume transformation range checking
This commit is contained in:
parent
d48458b80f
commit
d53aabefb0
2 changed files with 2 additions and 2 deletions
|
|
@ -50,7 +50,7 @@ var Volume = (function (_Transform) {
|
||||||
// Check whether the index is actually in range - sometimes it's possible
|
// Check whether the index is actually in range - sometimes it's possible
|
||||||
// that it skips ahead too far before the end condition of the for can
|
// that it skips ahead too far before the end condition of the for can
|
||||||
// kick in.
|
// kick in.
|
||||||
if (i >= buffer.length) {
|
if (i >= buffer.length - 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class Volume extends Transform {
|
||||||
// Check whether the index is actually in range - sometimes it's possible
|
// Check whether the index is actually in range - sometimes it's possible
|
||||||
// that it skips ahead too far before the end condition of the for can
|
// that it skips ahead too far before the end condition of the for can
|
||||||
// kick in.
|
// kick in.
|
||||||
if (i >= buffer.length) {
|
if (i >= buffer.length - 1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue