mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Fix typo in the substringData implementation.
This commit is contained in:
parent
db4609d722
commit
839830d1d8
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