Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

fix potential overflow #2

Merged
merged 2 commits into from
Feb 20, 2020
Merged

fix potential overflow #2

merged 2 commits into from
Feb 20, 2020

Conversation

mirceanis
Copy link
Collaborator

@mirceanis mirceanis commented Feb 20, 2020

@mirceanis mirceanis merged commit bfa1d93 into master Feb 20, 2020
@mirceanis mirceanis deleted the support/bump-kotlin-version branch February 20, 2020 13:32
@Artoria2e5
Copy link

Artoria2e5 commented Jan 19, 2024

This change should not be needed. It was needed for JS because every JS bitwise operation is preceded by a 32-bit signed integer conversion, but by all means (x[j] + 128) should be a long, representing a 64-bit signed integer in Kotlin. The original analysis in the cited issue suggests that the worse case is requiring 33 bits to store the number, so 64 should be more than needed.

(Take this comment with every grain of salt you have though. Between phlegm and caffeine, I'm not the person with the clearest head right now...)

@mirceanis
Copy link
Collaborator Author

Interesting.

Also, thanks for reminding me about this lib. I had forgotten about it :)

It's unmaintained

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants