diff --git a/besticon/besticon.go b/besticon/besticon.go index 9d9048c4..a8d7f672 100644 --- a/besticon/besticon.go +++ b/besticon/besticon.go @@ -112,7 +112,7 @@ func (f *IconFinder) IconInSizeRange(r SizeRange) *Icon { // Try to return biggest in range perfect..min sortIcons(icons, true) for _, ico := range icons { - if ico.Width >= r.Min && ico.Height >= r.Min { + if (ico.Width >= r.Min && ico.Height >= r.Min) && (ico.Width <= r.Perfect && ico.Height <= r.Perfect) { return &ico } }