Changeset 1295 for trunk


Ignore:
Timestamp:
Apr 25, 2012, 1:05:15 AM (8 years ago)
Author:
sam
Message:

core: fix a bug in the Array class copy constructor, found thanks to
the unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/array.h

    r1293 r1295  
    4040    {
    4141        Reserve(that.m_reserved);
    42         memcpy(m_data, that.m_data, m_count * sizeof(Element));
     42        memcpy(m_data, that.m_data, that.m_count * sizeof(Element));
    4343        m_count = that.m_count;
    4444    }
     
    4646    ArrayBase& operator=(ArrayBase const& that)
    4747    {
     48        /* FIXME: delete old data!! */
    4849        m_data = 0;
    4950        m_count = 0;
Note: See TracChangeset for help on using the changeset viewer.