Skip to content

Fix broken early exit in BasicSprite.color setter #1648

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

Merged

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented Mar 19, 2023

tl;dr this PR fixes a missing index which makes early exit never happen

  1. self._color is a 4-length tuple
  2. color[0] is expected to be an int
  3. Early exit will never happen because a 4-length tuple to an int will always be false

Discovered while working on #1639

@pushfoo pushfoo marked this pull request as ready for review March 19, 2023 09:31
@einarf einarf merged commit 6382be2 into pythonarcade:development Mar 19, 2023
@pushfoo pushfoo deleted the fix_sprite_color_comparison branch March 19, 2023 09:53
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.

2 participants