mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix an off by one error in volume transformation range checking
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user