Have atk_text_get_text check that end_offset is either -1 or greater or
equal to the start offset before passing the query to the toolkit. Fixes
a gtk crash.
Also document that an end position of -1 to atk_text_get_text indicates the
end of the string
* atk_text_get_text:
* @text: an #AtkText
* @start_offset: start position
- * @end_offset: end position
+ * @end_offset: end position, or -1 for the end of the string.
*
* Gets the specified text.
*
iface = ATK_TEXT_GET_IFACE (text);
- if (start_offset < 0 || end_offset < -1)
+ if (start_offset < 0 || end_offset < -1 ||
+ (end_offset != -1 && end_offset < start_offset))
return NULL;
if (iface->get_text)