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

Simple8 RLE wrong decompression #6

Open
kba-3e opened this issue Jul 24, 2019 · 0 comments
Open

Simple8 RLE wrong decompression #6

kba-3e opened this issue Jul 24, 2019 · 0 comments

Comments

@kba-3e
Copy link

kba-3e commented Jul 24, 2019

The Simple8 RLE decompression gives wrong values, for some inputs. In particular, when expanding a RLE compressed value, with significand bit set to 1, it will return a negative value.
For example: {0xF0000000L, 0xF0000000L, 0xF0000000L}

The offending line is

int value = (int) input[inputPos]; // Last 32 bits only

Which should be:

          long value = input[inputPos] & 0xFFFFFFFFL; // Last 32 bits only
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

No branches or pull requests

1 participant