There's a flaw in LinkedList also....  xOr talked with Raven on July
28th about this one....  Pasting from his e-mail....


I've found a problem in LinkedList.cc:

check out line 164:
      __llist_node *nnode = new __llist_node, *inode =
_first->getNext();
how this function works is, if 0 is passed in as the index to insert to,
then the new item is added at the top of the list.
So, the highest in the list one can insert after the top is, of course,
at
index 1.
The above line sets inode to _first->getNext, the _second_ element in
the
linked list.
If an index of 1 is passed in, then inode is not modified and the new
node
is added after inode.
This makes the new node go into index 2, not index 1.
A simple fix for this is to change line 164 to:
      __llist_node *nnode = new __llist_node, *inode = _first;

This probly affects most of the bbtools and maybe blackbox itself.. as
all
insertions into the linked list have been at (index+1).




On Tue, 2001-12-11 at 11:54, Sean 'Shaleh' Perry wrote:
> 
> Changes from 0.61.1 to 0.61.2:
>   - added the ja_JP nls directory
>   - general code cleanups
>   - blackbox-nls.hh is always generated even if --disable-nls is used.
>     This allows us to not have all of those hideous #ifdef NLS chunks.
>     Nothing to worry about, if you do not want NLS this does not affect you
>   - Workspace::placeWindow() cleanups.  Also a speed bump from reducing the
>     use of iterator->current() and changing the delta from 1 to 8
>   - cleanups to compile with g++ 3.0
>   - make distclean actually removes Translation.m and blackbox-nls.hh
>   - fixed a desciptor leak in BScreen::parseMenuFile, seems opendir
>     lacked a matching closedir.
> 
> Is my current changelog.  If anything in that list is not clear, please speak
> up.  If something should be in that list, also speak up.
-- 
----%<----------%<----
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26

Reply via email to