bitmap.c (bitmap_element_free): Don't forget to update head->indx when we update head->current.

2001-10-30  Daniel Berlin  <dan@cgsoftware.com>

	* bitmap.c (bitmap_element_free): Don't forget to update head->indx
	when we update head->current.

From-SVN: r46669
This commit is contained in:
Daniel Berlin 2001-10-31 03:01:17 +00:00 committed by Daniel Berlin
parent ec3fd6be49
commit 87a2e7a8a5
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2001-10-30 Daniel Berlin <dan@cgsoftware.com>
* bitmap.c (bitmap_element_free): Don't forget to update head->indx
when we update head->current.
2001-10-30 Neil Booth <neil@daikokuya.demon.co.uk>
* tree.c (id_string_size): Remove.

View File

@ -70,7 +70,11 @@ bitmap_element_free (head, elt)
/* Since the first thing we try is to insert before current,
make current the next entry in preference to the previous. */
if (head->current == elt)
head->current = next != 0 ? next : prev;
{
head->current = next != 0 ? next : prev;
if (head->current)
head->indx = head->current->indx;
}
elt->next = bitmap_free;
bitmap_free = elt;