Skip to content

Commit

Permalink
[common] rect: fix avx unaligned bytes copy
Browse files Browse the repository at this point in the history
Thanks @D0ot for debugging and finding this this, the LG community are
very appreciate for a fix for this long outstanding bug.

Fixes #1129
Closes #1136
  • Loading branch information
gnif committed Aug 29, 2024
1 parent 3ea37b8 commit 6a0a635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/rects.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static void rectCopyUnaligned_avx(
for (int i = ystart; i < yend; ++i)
{
// copy the unaligned bytes
for(int col = align; col >= 0; --col)
for(int col = align - 1; col >= 0; --col)
dst[col] = src[col];

const __m256i *restrict s = (__m256i*)(src + align);
Expand Down

0 comments on commit 6a0a635

Please sign in to comment.