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 divMod on Volume #121

Merged
merged 1 commit into from Sep 7, 2020
Merged

Fix divMod on Volume #121

merged 1 commit into from Sep 7, 2020

Conversation

pvsr
Copy link
Contributor

@pvsr pvsr commented Jun 11, 2020

The default implementation for divMod decides whether to adjust the result of quotRem based on the results of negate and signum. Since Volume can't be negative this test doesn't work and you end up with incorrect results like 60 divMod 5 == (11, 5). The correct behavior is for divMod to behave the same as quotRem.

The default implementation for divMod decides whether to adjust the
result of quotRem based on the results of negate and signum.  Since
Volume can't be negative this test doesn't work and you end up with
incorrect results like 60 `divMod` 5 == (11, 5). The correct behavior
is for divMod to behave the same as quotRem.
pvsr added a commit to pvsr/mpd-status that referenced this pull request Jun 11, 2020
@psibi psibi merged commit f40861a into vimus:master Sep 7, 2020
@psibi
Copy link
Collaborator

psibi commented Sep 7, 2020

Thanks!

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