[Suspected bug] CQueue::CopyTo error



I've found that CopyTo method has a mistake

Original code is :

template<typename T>

int CQueue::CopyTo(T &dst_array[],const int dst_start=0)


//--- resize array




//--- copy queue elements from head to tail

   if(m_tail >= m_head)


//--- copy queue elements from head to end

   int num_copied=ArrayCopy(dst_array,m_array,dst_start,m_head,m_size-m_head);

//--- copy queue elements from beginning to tail


//--- return number of copied elements



When CQueue is full it returns less elements than it actually has:

Error is in 

if(m_tail >= m_head)

Changing it to

if(m_tail > m_head)
makes it work as expected.