libobs: Fix da_reserve early return logic

Test desired capacity against original capacity instead of size.
master
jpark37 2020-05-09 09:15:02 -07:00
parent cc39efc6a4
commit 7dc2782840
1 changed files with 1 additions and 1 deletions

View File

@ -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);