mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Throw IndexError if start_in_channel is equal to ArrayBuffer length
This commit is contained in:
parent
10e8ab3892
commit
a81389268a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue