Fix an off by one error in volume transformation range checking

This commit is contained in:
meew0
2016-04-05 18:01:49 +02:00
parent d48458b80f
commit d53aabefb0
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}