Skip to content

Commit

Permalink
fix: svec copy init (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland authored Dec 10, 2024
1 parent d40b2c2 commit f98ca92
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/collections/vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ void _z_svec_move(_z_svec_t *dst, _z_svec_t *src) {

z_result_t _z_svec_copy(_z_svec_t *dst, const _z_svec_t *src, z_element_copy_f copy, size_t element_size,
bool use_elem_f) {
dst->_capacity = 0;
dst->_len = 0;
*dst = _z_svec_null();
dst->_val = z_malloc(element_size * src->_capacity);
if (dst->_val == NULL) {
return _Z_ERR_SYSTEM_OUT_OF_MEMORY;
Expand Down

0 comments on commit f98ca92

Please sign in to comment.