Index: atk/atktext.c
===================================================================
--- atk/atktext.c	(revision 1222)
+++ atk/atktext.c	(working copy)
@@ -206,9 +206,6 @@
 
   g_return_val_if_fail (ATK_IS_TEXT (text), (gunichar) 0);
 
-  if (offset < 0)
-    return (gunichar) 0;
-
   iface = ATK_TEXT_GET_IFACE (text);
 
   if (iface->get_character_at_offset)
@@ -377,9 +374,6 @@
   else
     real_end_offset = &local_end_offset;
 
-  if (offset < 0)
-    return NULL;
-
   iface = ATK_TEXT_GET_IFACE (text);
 
   if (iface->get_text_at_offset)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1222)
+++ ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2008-01-31  Li Yuan  <li.yuan@sun.com>
+
+	* atk/atktext.c: (atk_text_get_character_at_offset),
+	(atk_text_get_text_at_offset):
+	Bug #508846. Extend allowed indexes of 
+	ATK_TEXT_GET_TEXT_AT_OFFSET and
+	ATK_TEXT_GET_CHARACTER_AT_OFFSET to allow values -1 and -2.
+
 2008-01-14  Li Yuan  <li.yuan@sun.com>
 
 	* NEWS:
