Bug 1606721 - Fix crash on screen reader text requests with end offset smaller than -1, r=Jamie

Differential Revision: https://phabricator.services.mozilla.com/D82324
This commit is contained in:
Samuel Thibault 2020-07-08 22:47:11 +00:00
parent 97b8c4eeb3
commit 08cdd6ddc7

View File

@ -68,7 +68,7 @@ void ATKStringConverterHelper::AdjustOffsets(gint* aStartOffset,
mStartShifted = true;
}
if (*aEndOffset != -1 && *aEndOffset < count) {
if (*aEndOffset >= 0 && *aEndOffset < count) {
(*aEndOffset)++;
mEndShifted = true;
}