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:
Diffstat (limited to 'Common/Buffer.h')
-rwxr-xr-xCommon/Buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Common/Buffer.h b/Common/Buffer.h
index 9d5fcaec..9bd881cf 100755
--- a/Common/Buffer.h
+++ b/Common/Buffer.h
@@ -26,6 +26,8 @@ public:
size_t GetCapacity() const { return _capacity; }
void SetCapacity(size_t newCapacity)
{
+ if (newCapacity == _capacity)
+ return;
T *newBuffer;
if (newCapacity > 0)
{