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 bug in division of huge numbers #15

Merged
merged 1 commit into from
May 31, 2016
Merged

Fix bug in division of huge numbers #15

merged 1 commit into from
May 31, 2016

Conversation

aseaday
Copy link
Contributor

@aseaday aseaday commented May 31, 2016

The // will be more precise in this condition.

@tooooolong
Copy link

@Alir3z4 When encode/decode a big int, will get a wrong result. Here is a example:

>>> encoder.enbase(a)
'ueqf0wgbq4k0k'
>>> encoder.debase('ueqf0wgbq4k0k')
9223372036854775304
>>> a
9223372036854775808

And with this fix

>>> encode_url(9223372036854775304)
'pamj78cznbvrt'
>>> decode_url('pamj78cznbvrt')
9223372036854775304

@Alir3z4
Copy link
Owner

Alir3z4 commented May 31, 2016

@aseaday Thanks for the patch and fixing this bug.
@tooooolong Thank you for providing show case.

I'll merge this right away ;)

@Alir3z4 Alir3z4 merged commit d32f255 into Alir3z4:master May 31, 2016
@Alir3z4 Alir3z4 self-assigned this May 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants