Browse Source

util: Fix bug with darray_erase_range

Did not multiply the element size for the memory move operation.
jp9000 11 years ago
parent
commit
661d53067a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/util/darray.h

+ 1 - 1
libobs/util/darray.h

@@ -337,7 +337,7 @@ static inline void darray_erase_range(const size_t element_size,
 	if (move_count)
 		memmove(darray_item(element_size, dst, start),
 				darray_item(element_size, dst, end),
-				move_count);
+				move_count * element_size);
 
 	dst->num -= count;
 }