diff --git a/RePKG.Application/Constants.cs b/RePKG.Application/Constants.cs index 225bdb2..92019ca 100644 --- a/RePKG.Application/Constants.cs +++ b/RePKG.Application/Constants.cs @@ -5,6 +5,5 @@ internal static class Constants public const int MaximumFrameCount = 100_000; public const int MaximumImageCount = 100; public const int MaximumMipmapCount = 32; - public const int MaximumMipmapByteCount = 250_000_000; // 250 MB } } \ No newline at end of file diff --git a/RePKG.Application/Texture/TexImageReader.cs b/RePKG.Application/Texture/TexImageReader.cs index 7c5fa5e..5f51f84 100644 --- a/RePKG.Application/Texture/TexImageReader.cs +++ b/RePKG.Application/Texture/TexImageReader.cs @@ -111,10 +111,6 @@ private byte[] ReadBytes(BinaryReader reader) if (reader.BaseStream.Position + byteCount > reader.BaseStream.Length) throw new UnsafeTexException("Detected invalid mipmap byte count - exceeds stream length"); - if (byteCount > Constants.MaximumMipmapByteCount) - throw new UnsafeTexException( - $"Mipmap byte count exceeds maximum size: {byteCount}/{Constants.MaximumMipmapByteCount}"); - if (!ReadMipmapBytes) { reader.BaseStream.Seek(byteCount, SeekOrigin.Current);