quixdb / squash

Compression abstraction library and utilities
https://quixdb.github.io/squash/
MIT License
406 stars 53 forks source link

Options without allow_zero still allow zero, if the range includes zero #166

Closed Dr-Emann closed 9 years ago

Dr-Emann commented 9 years ago

The bad check is on this line.

The following options have a range that includes 0, and allow_zero = false:

Dr-Emann commented 9 years ago

I'm not sure if that's intended behavior or not. Even if allow_zero is intended as a way to optionally allow zero even when the range doesn't include zero, it feels weird not to set allow_zero true anyway.

nemequ commented 9 years ago

I'm not sure if that's intended behavior or not.

Nope, allow_zero should be in addition to the range. If 0 is included in the range it shouldn't matter if allow_zero is set or not.

Thanks for the report, I'll fix it ASAP.

nemequ commented 9 years ago

Should be fixed now, thanks!