From a90944fce0996f49e2926ddaa3a789b1ae4539d3 Mon Sep 17 00:00:00 2001 From: doot Date: Fri, 30 Aug 2024 04:43:40 +0800 Subject: [PATCH] [common] rect: fix avx unaligned bytes copy --- common/src/rects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/rects.c b/common/src/rects.c index d5da10155..90dd8db57 100644 --- a/common/src/rects.c +++ b/common/src/rects.c @@ -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);