We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94d0f72 commit e7ce5faCopy full SHA for e7ce5fa
src/ImageSharp.Textures/Compression/Astc/IO/AstcFileHeader.cs
@@ -1,6 +1,8 @@
1
// Copyright (c) Six Labors.
2
// Licensed under the Six Labors Split License.
3
4
+using System.Buffers.Binary;
5
+
6
namespace SixLabors.ImageSharp.Textures.Compression.Astc.IO;
7
8
/// <summary>
@@ -27,7 +29,7 @@ public static AstcFileHeader FromMemory(Span<byte> data)
27
29
// - magic (4),
28
30
// - blockdim (3),
31
// - xsize,y,z (each 3 little-endian bytes)
- uint magic = BitConverter.ToUInt32(data);
32
+ uint magic = BinaryPrimitives.ReadUInt32LittleEndian(data);
33
ArgumentOutOfRangeException.ThrowIfNotEqual(magic, Magic);
34
35
return new AstcFileHeader(
0 commit comments