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: iOS Timeout is broken because of Double miss conversion #870

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

EArminjon
Copy link
Contributor

@EArminjon EArminjon commented Nov 21, 2023

A Double conversion is broken leading to an Int round result.
(You can quickly check that here : https://online.swiftplayground.run/)

// Default conversion will use int
print(500 / 1000) // 0 
// Wrong conversion to Double
print(Double(500 / 1000)) // 0.0 
// Good conversion to Double
print(500 / Double(1000)) // 0.5

Important bug :).

print(500 / 1000) -> 0
print(Double(500 / 1000)) -> 0.0
print(500 / Double(1000)) -> 0.5
@EArminjon
Copy link
Contributor Author

EArminjon commented Nov 21, 2023

Little wish : Can you after merging this PR release a new version on pub.dev ?

@navaronbracke navaronbracke merged commit f740b3a into juliansteenbakker:master Nov 21, 2023
11 checks passed
@navaronbracke
Copy link
Collaborator

I'll release a new version with this fix tomorrow.

@navaronbracke
Copy link
Collaborator

@EArminjon Version 3.5.3 is now available on pub.dev. Thank you for your contribution!

joaopedro735 pushed a commit to joaopedro735/mobile_scanner that referenced this pull request Aug 22, 2024
fix: iOS Timeout is broken because of Double miss conversion
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