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
parent
f077004523
commit
d1b6a04afc
|
@ -284,7 +284,7 @@ static inline void darray_insert_array(const size_t element_size,
|
||||||
|
|
||||||
assert(array != NULL);
|
assert(array != NULL);
|
||||||
assert(num != 0);
|
assert(num != 0);
|
||||||
assert(idx < dst->num);
|
assert(idx <= dst->num);
|
||||||
|
|
||||||
old_num = dst->num;
|
old_num = dst->num;
|
||||||
darray_resize(element_size, dst, dst->num + num);
|
darray_resize(element_size, dst, dst->num + num);
|
||||||
|
|
Loading…
Reference in New Issue