Skip to content

Commit

Permalink
Update src/bmi_cfe.c
Browse files Browse the repository at this point in the history
Co-authored-by: Nels <[email protected]>
  • Loading branch information
ajkhattak and hellkite500 authored Aug 30, 2024
1 parent 8bd8924 commit 3f43749
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bmi_cfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,9 @@ static int Set_value_at_indices (Bmi *self, const char *name, int * inds, int le
size_t i;
size_t offset;
char * ptr;
// iterate over the source pointer, src, by itemsize byte chunks
// and set the destination pointer, dest, to the value in src
// based on the linear offset provided by inds[i]
for (i=0, ptr=(char*)src; i<len; i++, ptr+=itemsize) {
offset = inds[i] * itemsize;
memcpy ((char*)dest + offset, ptr, itemsize);
Expand Down

0 comments on commit 3f43749

Please sign in to comment.