[g-a-devel]g_utf8_get_char use in gail ...
- From: Michael Meeks <michael ximian com>
- To: Padraig O'Briain <Padraig Obriain sun com>
- Cc: accessibility mailing list <gnome-accessibility-devel gnome org>
- Subject: [g-a-devel]g_utf8_get_char use in gail ...
- Date: 02 Apr 2002 17:45:57 +0100
This code fragment contains a crasher bug:
static gunichar
gail_entry_get_character_at_offset (AtkText *text,
gint offset)
{
GtkWidget *widget;
GtkEntry *entry;
gchar *string;
gchar *index;
widget = GTK_ACCESSIBLE (text)->widget;
if (widget == NULL)
/* State is defunct */
return '\0';
entry = GTK_ENTRY (widget);
string = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
index = g_utf8_offset_to_pointer (string, offset);
g_free(string);
return g_utf8_get_char(index);
}
It would be good to audit all uses of that method on that basis.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]