mirror of
https://github.com/danbulant/discord.js
synced 2026-06-18 22:21:17 +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
|
||||
// that it skips ahead too far before the end condition of the for can
|
||||
// kick in.
|
||||
if (i >= buffer.length) {
|
||||
if (i >= buffer.length - 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Volume extends Transform {
|
|||
// 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
|
||||
// kick in.
|
||||
if (i >= buffer.length) {
|
||||
if (i >= buffer.length - 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue