mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Fixing a flaw I found in Vector copy constructor
_buffer wasn’t being initialized if the incoming vector had a zero size
This commit is contained in:
parent
0474b5db5c
commit
9c1f7ff9bf
@ -46,10 +46,8 @@ namespace Spine
|
||||
// Empty
|
||||
}
|
||||
|
||||
Vector(const Vector& inArray)
|
||||
Vector(const Vector& inArray) : _size(inArray._size), _capacity(inArray._capacity), _buffer(NULL)
|
||||
{
|
||||
_size = inArray._size;
|
||||
_capacity = inArray._capacity;
|
||||
if (_capacity > 0)
|
||||
{
|
||||
_buffer = allocate(_capacity);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user