mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-24 16:28:07 -04:00
libobs: Fix da_reserve early return logic
Test desired capacity against original capacity instead of size.
This commit is contained in:
@@ -84,7 +84,7 @@ static inline void darray_reserve(const size_t element_size, struct darray *dst,
|
||||
const size_t capacity)
|
||||
{
|
||||
void *ptr;
|
||||
if (capacity == 0 || capacity <= dst->num)
|
||||
if (capacity == 0 || capacity <= dst->capacity)
|
||||
return;
|
||||
|
||||
ptr = bmalloc(element_size * capacity);
|
||||
|
||||
Reference in New Issue
Block a user