Commit 7cacb924 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Correct memcpy to use sizeof(int), not sizeof(type)

parent 740faaac
......@@ -489,7 +489,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
int *ind_new;
if ((ind_new = (int *)malloc(sizeof(int) * s->nr_parts)) == NULL)
error("Failed to allocate temporary particle indices.");
memcpy(ind_new, ind, sizeof(size_t) * nr_parts);
memcpy(ind_new, ind, sizeof(int) * nr_parts);
ind = ind_new;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment