Browse Source

Use DebugGuard

pull/2269/head
Anton Firszov 3 years ago
committed by GitHub
parent
commit
830d3e2b41
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Processing/Processors/Quantization/DefaultPixelSamplingStrategy.cs

2
src/ImageSharp/Processing/Processors/Quantization/DefaultPixelSamplingStrategy.cs

@ -87,7 +87,7 @@ public class DefaultPixelSamplingStrategy : IPixelSamplingStrategy
for (int pos = 0; pos < totalNumberOfRows; pos++)
{
Debug.Assert(denom > 0, "Denominator must be greater than zero.");
DebugGuard.MustBeGreaterThan(denom, 0, "Denominator must be greater than zero.");
int subPos = (int)((uint)pos % (uint)denom);
if (subPos < num)
{

Loading…
Cancel
Save