diff options
-rw-r--r-- | src/mem/ruby/common/Set.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mem/ruby/common/Set.cc b/src/mem/ruby/common/Set.cc index f7dd24356..467a09186 100644 --- a/src/mem/ruby/common/Set.cc +++ b/src/mem/ruby/common/Set.cc @@ -69,8 +69,11 @@ Set::Set(const Set& obj) { Set::Set(int size) { m_p_nArray = NULL; - assert(size>0); - setSize(size); + m_nArrayLen = 0; + m_nSize = 0; + if(size > 0) { + setSize(size); + } } Set::~Set() { |