Fix invalid arguments to memcpy in IMB_rectfill_area_replace

Passing the pointer to the array doesn't make sense in this case.
This commit is contained in:
Campbell Barton 2023-01-15 23:45:56 +11:00
parent 82bd020a30
commit 8c7df5fa72
1 changed files with 2 additions and 2 deletions

View File

@ -1112,12 +1112,12 @@ void IMB_rectfill_area_replace(
if (ibuf->rect) {
uchar *rrect = (uchar *)ibuf->rect + offset;
memcpy(rrect, &col_char, sizeof(uchar) * 4);
memcpy(rrect, col_char, sizeof(uchar[4]));
}
if (ibuf->rect_float) {
float *rrectf = ibuf->rect_float + offset;
memcpy(rrectf, &col, sizeof(float) * 4);
memcpy(rrectf, col, sizeof(float[4]));
}
}
}