}
// Casting (void *) to (uint8_t *) should result in an increment of size 1 and avoids problems with (void *) having arithmetic issues.
- memcpy((void *) (((uint8_t *) (*array)) + (*used * width)), source, width);
+ memmove((void *) (((uint8_t *) (*array)) + (*used * width)), source, width);
++(*used);
}
// Casting (void *) to (uint8_t *) should result in an increment of size 1 and avoids problems with (void *) having arithmetic issues.
- memcpy((void *) (((uint8_t *) (*array)) + (*used * width)), sources, width * amount);
+ memmove((void *) (((uint8_t *) (*array)) + (*used * width)), sources, width * amount);
*used += amount;
* F_array_too_large (with error bit) if the new array length is too large.
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see memmove()
*/
#ifndef _di_f_memory_array_append_
extern f_status_t f_memory_array_append(const void * const source, const size_t width, void ** const array, f_number_unsigned_t * restrict const used, f_number_unsigned_t * restrict const size);
* F_array_too_large (with error bit) if the new array length is too large.
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see memmove()
*/
#ifndef _di_f_memory_array_append_all_
extern f_status_t f_memory_array_append_all(const void * const sources, const f_number_unsigned_t amount, const size_t width, void ** const array, f_number_unsigned_t * restrict const used, f_number_unsigned_t * restrict const size);