Skip to content

fix: add guards for MagickImage.Shave#1581

Merged
dlemstra merged 2 commits intodlemstra:mainfrom
Gounlaf:magickimage-shave-guards
Mar 9, 2024
Merged

fix: add guards for MagickImage.Shave#1581
dlemstra merged 2 commits intodlemstra:mainfrom
Gounlaf:magickimage-shave-guards

Conversation

@Gounlaf
Copy link
Contributor

@Gounlaf Gounlaf commented Mar 8, 2024

👋

Same as usual 😅 : adding guards to prevent negative parameters.

Regards.

[Fact]
public void ShouldThrowExceptionWhenSizeIsNegative()
{
using var image = new MagickImage(Files.Builtin.Logo);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need to load an image here.

Copy link
Contributor Author

@Gounlaf Gounlaf Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duly noted. Saw your commits removing image loading. Will update this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased & updated as requested.

@Gounlaf Gounlaf force-pushed the magickimage-shave-guards branch from dd8ef85 to 40761aa Compare March 8, 2024 22:39
@dlemstra dlemstra merged commit 833dc8c into dlemstra:main Mar 9, 2024
@Gounlaf Gounlaf deleted the magickimage-shave-guards branch March 9, 2024 12:37
This was referenced Jul 23, 2025
This was referenced Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants