[orca] Sanity-check offsets before calling getRangeExtents()
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Sanity-check offsets before calling getRangeExtents()
- Date: Mon, 15 Oct 2018 14:07:39 +0000 (UTC)
commit 9d34ea156d33e1f44604bc376144d75ea055301c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Oct 15 16:06:46 2018 +0200
Sanity-check offsets before calling getRangeExtents()
src/orca/scripts/web/script_utilities.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 48768009f..d66f6f944 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -717,7 +717,7 @@ class Utilities(script_utilities.Utilities):
try:
text = obj.queryText()
- if text.characterCount:
+ if text.characterCount and 0 <= startOffset < endOffset:
return list(text.getRangeExtents(startOffset, endOffset, 0))
except NotImplementedError:
pass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]