libobs/util: Fix incorrect assertion in darray_insert_array

Previously the assertion required the idx to be smaller than the number
of elements in the darray. This would mean you could not insert anything
at the end of a darray, and would make it impossible to insert an array
into an empty darray.
master
VodBox 2020-02-03 10:44:15 +13:00
parent f077004523
commit d1b6a04afc
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ static inline void darray_insert_array(const size_t element_size,
assert(array != NULL);
assert(num != 0);
assert(idx < dst->num);
assert(idx <= dst->num);
old_num = dst->num;
darray_resize(element_size, dst, dst->num + num);