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
(cherry picked from commit 54d665b)
  • Loading branch information
andrei-drexler authored and alexey-lysiuk committed Nov 27, 2024
1 parent 0330d82 commit e92a6bd
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 @@ -189,7 +189,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 e92a6bd

Please sign in to comment.