diff --git a/lib/common/zstd_internal.h b/lib/common/zstd_internal.h index ee3cb51bf..9fd2a6acc 100644 --- a/lib/common/zstd_internal.h +++ b/lib/common/zstd_internal.h @@ -290,8 +290,10 @@ void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length, ZSTD_overlap_e } while (op < oend); #else - COPY16(op, ip); - if (op >= oend) return; + ZSTD_copy16(op, ip); + if (16 >= length) return; + op += 16; + ip += 16; do { COPY16(op, ip); COPY16(op, ip);