From 85a0ac644d1e51c87b510428c882e51b26aad3e4 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 21 Feb 2022 21:29:13 +1100 Subject: [PATCH] Use GifThrowHelper --- src/ImageSharp/Formats/Gif/LzwDecoder.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Gif/LzwDecoder.cs b/src/ImageSharp/Formats/Gif/LzwDecoder.cs index 470929c4a1..2a07200016 100644 --- a/src/ImageSharp/Formats/Gif/LzwDecoder.cs +++ b/src/ImageSharp/Formats/Gif/LzwDecoder.cs @@ -79,7 +79,7 @@ namespace SixLabors.ImageSharp.Formats.Gif // Don't attempt to decode the frame indices. // Theoretically we could determine a min code size from the length of the provided // color palette but we won't bother since the image is most likely corrupted. - ThrowBadMinimumCode(); + GifThrowHelper.ThrowInvalidImageContentException("Gif Image does not contain a valid LZW minimum code."); } // The resulting index table length. @@ -263,8 +263,5 @@ namespace SixLabors.ImageSharp.Formats.Gif this.suffix.Dispose(); this.pixelStack.Dispose(); } - - [MethodImpl(InliningOptions.ColdPath)] - public static void ThrowBadMinimumCode() => throw new InvalidImageContentException("Gif Image does not contain a valid LZW minimum code."); } }