diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/html/nsHyperTextAccessible.cpp index 458e28f3fb0a..a53afafc6540 100644 --- a/accessible/src/html/nsHyperTextAccessible.cpp +++ b/accessible/src/html/nsHyperTextAccessible.cpp @@ -860,7 +860,7 @@ NS_IMETHODIMP nsHyperTextAccessible::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *a nsCOMPtr accessible; - while (NextChild(accessible) && characterCount < aCharIndex) { + while (NextChild(accessible) && characterCount <= aCharIndex) { PRUint32 role = Role(accessible); if (role == ROLE_TEXT_LEAF) { nsCOMPtr accessNode(do_QueryInterface(accessible));