aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/audiobuffer.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2018-09-18 16:45:35 +0200
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2018-09-19 06:54:17 +0200
commita81389268aa9937972dd1c9fc6fb5c4bd96d2c7e (patch)
treead1b84473bb984876da73dec8cba55c20dd1ce24 /components/script/dom/audiobuffer.rs
parent10e8ab3892ce42c9a27d14beea1362b38284807e (diff)
downloadservo-a81389268aa9937972dd1c9fc6fb5c4bd96d2c7e.tar.gz
servo-a81389268aa9937972dd1c9fc6fb5c4bd96d2c7e.zip
Throw IndexError if start_in_channel is equal to ArrayBuffer length
Diffstat (limited to 'components/script/dom/audiobuffer.rs')
-rw-r--r--components/script/dom/audiobuffer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/audiobuffer.rs b/components/script/dom/audiobuffer.rs
index 16cc1d257cf..5143bb82304 100644
--- a/components/script/dom/audiobuffer.rs
+++ b/components/script/dom/audiobuffer.rs
@@ -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);
}