Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-12-31 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:58 +0300
commit3a524e5ba2d7bb0c46e11502822f8093dd2ab0f4 (patch)
treeb33da9cac0a5fc22a16bdf4de106c8a9eefd1465 /CPP/Common
parentc1f1243a70558e86e14b1ea09dc287737378894b (diff)
4.634.63
Diffstat (limited to 'CPP/Common')
-rwxr-xr-xCPP/Common/MyVector.cpp2
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;