libobs: Fix da_reserve early return logic
Test desired capacity against original capacity instead of size.master
parent
cc39efc6a4
commit
7dc2782840
|
@ -84,7 +84,7 @@ static inline void darray_reserve(const size_t element_size, struct darray *dst,
|
||||||
const size_t capacity)
|
const size_t capacity)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
if (capacity == 0 || capacity <= dst->num)
|
if (capacity == 0 || capacity <= dst->capacity)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ptr = bmalloc(element_size * capacity);
|
ptr = bmalloc(element_size * capacity);
|
||||||
|
|
Loading…
Reference in New Issue