Commit 87a2e7a8 by Daniel Berlin Committed by Daniel Berlin

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
parent ec3fd6be
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> 2001-10-30 Neil Booth <neil@daikokuya.demon.co.uk>
* tree.c (id_string_size): Remove. * tree.c (id_string_size): Remove.
......
...@@ -70,7 +70,11 @@ bitmap_element_free (head, elt) ...@@ -70,7 +70,11 @@ bitmap_element_free (head, elt)
/* Since the first thing we try is to insert before current, /* Since the first thing we try is to insert before current,
make current the next entry in preference to the previous. */ make current the next entry in preference to the previous. */
if (head->current == elt) 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; elt->next = bitmap_free;
bitmap_free = elt; bitmap_free = elt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment