From d934bad69e554517df55c204a7e7f482f58ddef4 Mon Sep 17 00:00:00 2001 From: Dmitry Pentin Date: Fri, 17 Sep 2021 05:01:12 +0300 Subject: [PATCH] gfoidl fixes --- src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs b/src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs index 9cefedc1d2..9d49b8c45f 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Block8x8.cs @@ -225,10 +225,10 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components [MethodImpl(InliningOptions.ShortMethod)] public void LoadFrom(Span source) { - ref byte s = ref Unsafe.As(ref MemoryMarshal.GetReference(source)); - ref byte d = ref Unsafe.As(ref this); + ref byte sourceRef = ref Unsafe.As(ref MemoryMarshal.GetReference(source)); + ref byte destRef = ref Unsafe.As(ref this); - Unsafe.CopyBlock(ref d, ref s, Size * sizeof(short)); + Unsafe.CopyBlockUnaligned(ref destRef, ref sourceRef, Size * sizeof(short)); } ///