Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix crash #22

wants to merge 3 commits into from

Conversation

LinXunFeng
Copy link

Fix crash

It will crash when width or height equal zero

let bgImg = UIImage.size(width: 1, height: 0).color(.red).image
let bgImg = UIImage.size(width: 0, height: 1).color(.red).image

@LinXunFeng
Copy link
Author

LinXunFeng commented Feb 17, 2022

Fix sencond bug

I use two color (fe7338 and fc8e2b), their hashValue are same

so, these codes will be bug

hasher.combine(self.colors)
hasher.combine(self.borderColors)

image

Resolve: I transform UIColor to HexString before compare hashValue

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.

1 participant