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

RPaned: ensure get_relative always returns a value between 0 and 1 #2330

Merged
merged 1 commit into from Mar 18, 2017

Conversation

frestr
Copy link
Member

@frestr frestr commented Mar 18, 2017

Fixes #2321

The cause of the issue was that RPaned's get_relative() occasionally returned a value greater than 1, because get_max() returned a value of 1 while get_position() returned a value >1. The solution was to not solely trust the _alloced flag, and instead return __relative in cases where the function otherwise would return invalid values.

To make the relative position consistently between 0 and 1, I also added a check for this in set_relative().

@lazka lazka merged commit a57822d into quodlibet:master Mar 18, 2017
@lazka
Copy link
Member

lazka commented Mar 18, 2017

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