mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Auto merge of #5630 - Ms2ger:substringData, r=Manishearth
This commit is contained in:
commit
ebf5a70b51
2 changed files with 1 additions and 4 deletions
|
@ -73,7 +73,7 @@ impl<'a> CharacterDataMethods for JSRef<'a, CharacterData> {
|
|||
let data = self.data.borrow();
|
||||
// Step 1.
|
||||
let len = data.chars().count();
|
||||
if len > offset as usize {
|
||||
if offset as usize > len {
|
||||
// Step 2.
|
||||
return Err(IndexSize);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue