common array: fix a wrong size.

This commit is contained in:
Hermet Park 2023-07-18 15:07:48 +09:00
parent 463fc853be
commit d99d8a565f

View file

@ -108,7 +108,7 @@ struct Array
void operator=(const Array& rhs) void operator=(const Array& rhs)
{ {
reserve(rhs.count); reserve(rhs.count);
if (rhs.count > 0) memcpy(data, rhs.data, sizeof(T) * reserved); if (rhs.count > 0) memcpy(data, rhs.data, sizeof(T) * rhs.count);
count = rhs.count; count = rhs.count;
} }