Skip to content

Commit c9b4edd

Browse files
Use proper constant
1 parent 5cf8f60 commit c9b4edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ImageSharp/Common/Helpers/Vector128Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public static Vector128<byte> ShiftLeftBytesInVector(Vector128<byte> value, [Con
140140
if (AdvSimd.IsSupported)
141141
{
142142
#pragma warning disable CA1857 // A constant is expected for the parameter
143-
return AdvSimd.ExtractVector128(Vector128<byte>.Zero, value, (byte)(16 - numBytes));
143+
return AdvSimd.ExtractVector128(Vector128<byte>.Zero, value, (byte)(Vector128<byte>.Count - numBytes));
144144
#pragma warning restore CA1857 // A constant is expected for the parameter
145145
}
146146

0 commit comments

Comments
 (0)