Skip to content

Commit 8872b2b

Browse files
Fix access violation
1 parent ebfd069 commit 8872b2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ImageSharp/Formats/Jpeg/Components/Decoder/ColorConverters/JpegColorConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ public void PackAvx2(
204204
in Vector256<int> vcontrol)
205205
{
206206
Vector256<float> r0 = Avx.InsertVector128(
207-
Unsafe.As<Vector4, Vector256<float>>(ref r.A),
207+
Unsafe.As<Vector4, Vector128<float>>(ref r.A).ToVector256(),
208208
Unsafe.As<Vector4, Vector128<float>>(ref g.A),
209209
1);
210210

211211
Vector256<float> r1 = Avx.InsertVector128(
212-
Unsafe.As<Vector4, Vector256<float>>(ref b.A),
212+
Unsafe.As<Vector4, Vector128<float>>(ref b.A).ToVector256(),
213213
a,
214214
1);
215215

0 commit comments

Comments
 (0)