vimus / libmpd-haskell

A client library for MPD, the Music Player Daemon
MIT License
36 stars 26 forks source link

Fix divMod on Volume #121

Closed pvsr closed 3 years ago

pvsr commented 4 years ago

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.

psibi commented 3 years ago

Thanks!