From e4cb36e6ed24c4ec757d88985eaf708a483bfc8c Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sat, 28 Mar 2026 14:36:51 +0800 Subject: [PATCH] Fix Array TrimExcess condition TrimExcess should shrink the buffer when allocated capacity exceeds the logical size (mSize < mAllocSize). The previous comparison never held in valid states. --- BeefySysLib/util/Array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefySysLib/util/Array.h b/BeefySysLib/util/Array.h index 670b50585..fe34209cf 100644 --- a/BeefySysLib/util/Array.h +++ b/BeefySysLib/util/Array.h @@ -878,7 +878,7 @@ class ArrayImpl : public ArrayBase void TrimExcess() { - if (this->mSize > this->mAllocSize) + if (this->mSize < this->mAllocSize) SetBufferSize(this->mSize); }