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 on rotate on very small angle #1080

Closed
wants to merge 1 commit into from

Conversation

Screon
Copy link
Contributor

@Screon Screon commented Aug 1, 2018

Tested on rotation on very small angle.
AS IS
Crash onview.twoFingerRotate(at: CGPoint(x: 0, y: 0), angle: angle) when angle = 0.01
IN RESULT
No crash

Safe way to get first element in array
justinseanmartin added a commit to justinseanmartin/KIF that referenced this pull request Aug 2, 2018
Add some generics to the arrays to make it a bit more clear
Enforce that we always send at least 2 points for the path in 'twoFingerRotateAtPoint:angle:'.
Add more safety in 'dragPointsAlongPaths:'.
justinseanmartin added a commit to justinseanmartin/KIF that referenced this pull request Aug 2, 2018
Add some generics to the arrays to make it a bit more clear
Enforce that we always send at least 2 points for the path in 'twoFingerRotateAtPoint:angle:'.
Add more safety in 'dragPointsAlongPaths:'.
@justinseanmartin
Copy link
Contributor

Thank you for identifying and root causing the issue! I've picked up your change into another branch and I'll include your commit along with my changes in #1081. Please take a look. Thanks!

justinseanmartin added a commit to justinseanmartin/KIF that referenced this pull request Aug 3, 2018
Add some generics to the arrays to make it a bit more clear
Enforce that we always send at least 2 points for the path in 'twoFingerRotateAtPoint:angle:'.
Add more safety in 'dragPointsAlongPaths:'.
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.

None yet

2 participants