diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs index 668c36ad5..6ee1d9e46 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs @@ -52,6 +52,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder /// public bool ReachedEOF => this.LastErrorCode == OrigDecoderErrorCode.UnexpectedEndOfStream; + public bool HasError => this.LastErrorCode != OrigDecoderErrorCode.NoError; + public OrigDecoderErrorCode LastErrorCode { get; private set; } public void ResetErrorState() => this.LastErrorCode = OrigDecoderErrorCode.NoError; diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OrigJpegScanDecoder.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OrigJpegScanDecoder.cs index 3b09b5c3f..c13d3cf74 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OrigJpegScanDecoder.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/OrigJpegScanDecoder.cs @@ -650,7 +650,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder bool bit; bp.DecodeBitUnsafe(out bit); - if (!bp.CheckEOFEnsureNoError()) + if (bp.HasError) { return int.MinValue; } diff --git a/tests/Images/External b/tests/Images/External index 90cd8c2da..f99c2ea41 160000 --- a/tests/Images/External +++ b/tests/Images/External @@ -1 +1 @@ -Subproject commit 90cd8c2dae16b18bb99e8c2166da72b3159e58c4 +Subproject commit f99c2ea41419cb3b3e80e5beeab611682252df78