diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/alloc_type.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp index b95fc79ee..4451f0479 100644 --- a/src/core/alloc_type.hpp +++ b/src/core/alloc_type.hpp @@ -102,6 +102,7 @@ public: if (this->count < count) { free(this->buffer); this->buffer = MallocT<T>(count); + this->count = count; } return this->buffer; } @@ -118,6 +119,7 @@ public: if (this->count < count) { free(this->buffer); this->buffer = CallocT<T>(count); + this->count = count; } else { memset(this->buffer, 0, sizeof(T) * count); } |