fix to the toBytes at initial check.

This commit is contained in:
favoritas37 2015-06-14 13:57:27 +03:00
parent 977022f63f
commit 095b27a4b2
1 changed files with 2 additions and 2 deletions

View File

@ -206,8 +206,8 @@ void BitArray::xor_(const BitArray& other)
void BitArray::toBytes(int bitOffset, std::vector<char>& array, int offset, int numBytes)
{
if(array.size() < numBytes)
array.resize(numBytes);
if(array.size() < (numBytes + offset))
array.resize(numBytes + offset);
for (int i = 0; i < numBytes; i++) {
int theByte = 0;