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 RLE decompress with bitstring >= 4.1.0 #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Daft-Freak
Copy link
Collaborator

Relevant part from bitstring release notes:

Only empty bitstring are now considered false in a boolean sense. Previously s was False if no bits in s were set to 1, but this goes against what it means to be a container in Python, so I consider this to be a bug, even if it was documented. I'm guessing it's related to nonzero in Python 2 becoming bool in Python 3, and it's never been fixed before now.

This was breaking image encoding as well as it seems a decompress happens at some point.

Also change the test to use some real data. (It wasn't failing as the data was all the same, so all enceded as runs)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9112910058

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.102%

Totals Coverage Status
Change from base Build 5003532834: 0.0%
Covered Lines: 1270
Relevant Lines: 1475

💛 - Coveralls

@Daft-Freak
Copy link
Collaborator Author

So, I just checked and this suggests that any new installs since last August are broken...

@Gadgetoid
Copy link
Contributor

Woof. I guess it would be a good idea to expedite a new tools release!

@Gadgetoid
Copy link
Contributor

Oh gosh as a maintainer is it now my duty to check that no_image.raw doesn't somehow unpack into an install time remote access trojan? 😆

@Daft-Freak
Copy link
Collaborator Author

Should be the same as the png but raw paletted, unless I messed up and made accidental malware. 🤷

Yeah, releasing this would be good, think I just missed hitting this the last time I reinstalled. (Not sure if that was lucky or not 🤔 )

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

3 participants