Skip to content

Commit

Permalink
Fix destination offset in Vec_Append when element_size > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler authored and sezero committed Nov 26, 2024
1 parent dff7642 commit 54d665b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quake/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void Vec_Append (void **pvec, size_t element_size, const void *data, size_t coun
if (!count)
return;
Vec_Grow (pvec, element_size, count);
memcpy ((byte *)*pvec + VEC_HEADER(*pvec).size, data, count * element_size);
memcpy ((byte *)*pvec + VEC_HEADER(*pvec).size * element_size, data, count * element_size);
VEC_HEADER(*pvec).size += count;
}

Expand Down

0 comments on commit 54d665b

Please sign in to comment.