diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-12-31 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:58 +0300 |
commit | 3a524e5ba2d7bb0c46e11502822f8093dd2ab0f4 (patch) | |
tree | b33da9cac0a5fc22a16bdf4de106c8a9eefd1465 /CPP/Common | |
parent | c1f1243a70558e86e14b1ea09dc287737378894b (diff) |
4.634.63
Diffstat (limited to 'CPP/Common')
-rwxr-xr-x | CPP/Common/MyVector.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CPP/Common/MyVector.cpp b/CPP/Common/MyVector.cpp index 2a0aa15a..88d9993a 100755 --- a/CPP/Common/MyVector.cpp +++ b/CPP/Common/MyVector.cpp @@ -49,7 +49,7 @@ void CBaseRecordVector::Reserve(int newCapacity) p = new unsigned char[newSize]; if (p == 0) throw 1052355; - int numRecordsToMove = _size; + int numRecordsToMove = (_size < newCapacity ? _size : newCapacity); memcpy(p, _items, _itemSize * numRecordsToMove); } delete [](unsigned char *)_items; |