Fix typo in the substringData implementation.

This commit is contained in:
Ms2ger 2015-04-10 09:20:26 +02:00
parent db4609d722
commit 839830d1d8
2 changed files with 1 additions and 4 deletions

View file

@ -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);
}