g_list_remove_link bug
- From: Roland Bock <rbock eudoxos de>
- To: gtk-list <gtk-list redhat com>
- Subject: g_list_remove_link bug
- Date: Tue, 08 Jun 1999 20:09:12 +0200
Hi!
I think there is a bug in glib-1.2:
In function
GList*
g_list_remove_link (GList *list,
GList *link)
link is removed from the list. If link and list are identical, then
list=list->next. This is good most of the time, but when list (and link)
is the last element of the list, this results in list=NULL.
I would like to see it like this:
...
if (link == list)
if (list->next)
list = list->next;
else
list = list->prev;
...
Greetings,
Roland Bock
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]