[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] bug and patch for queue.h



Hi,

an obvious bug with a simple fix (found in 2.1b7 and b8):

queue.h:

class PacketQueue
{
...
   Packet* getNext()
   {
      Packet *tmp=iter;
-     iter=iter->next_;
+    if (iter!=0) iter=iter->next_;
   return tmp;
};

now I can use loops like
resetIterator();
for (Packet* p=getNext(); p!=0; p=getNext())
{ ... };

Bye
Alex

application/ms-tnef