Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all AudioBuffer WPTs #21602

Merged
merged 10 commits into from Sep 19, 2018

Throw IndexError if start_in_channel is equal to ArrayBuffer length

  • Loading branch information
ferjm committed Sep 19, 2018
commit a81389268aa9937972dd1c9fc6fb5c4bd96d2c7e
@@ -227,7 +227,7 @@ impl AudioBufferMethods for AudioBuffer {
return Err(Error::Type("Cannot copy to shared buffer".to_owned()));
}

if channel_number >= self.number_of_channels || start_in_channel > self.length {
if channel_number >= self.number_of_channels || start_in_channel >= self.length {
return Err(Error::IndexSize);
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.