From 8826e87718d50b24976e128b73c1e148aac262bd Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 18 Jul 2022 21:45:58 +1000 Subject: [PATCH] Update src/ImageSharp/Formats/DecoderOptions.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Günther Foidl --- src/ImageSharp/Formats/DecoderOptions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/DecoderOptions.cs b/src/ImageSharp/Formats/DecoderOptions.cs index 5e03efb6e9..1fa28983d2 100644 --- a/src/ImageSharp/Formats/DecoderOptions.cs +++ b/src/ImageSharp/Formats/DecoderOptions.cs @@ -37,6 +37,6 @@ namespace SixLabors.ImageSharp.Formats /// /// Gets or sets the maximum number of image frames to decode, inclusive. /// - public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Min(Math.Max(value, 1), int.MaxValue); } + public uint MaxFrames { get => this.maxFrames; set => this.maxFrames = Math.Clamp(value, 1, int.MaxValue); } } }