Skip to content

Commit 7364d75

Browse files
committed
Replace finish state comparison to use mask check, rather than value check
1 parent 45c3c17 commit 7364d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/software/coley/lljzip/format/compression/UnsafeDeflateDecompressor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public ByteData decompress(LocalFileHeader header, ByteData data) throws IOExcep
7474
out.write(output, 0, written);
7575
}
7676
int state = entry.state;
77-
if (state == 2) {
77+
if ((state & 0b10) == 0b10) {
7878
// FIXME: This shouldn't happen, but if you're on JDK 9+ and the new inflate method is not found
7979
// then the existing handling does not properly reset the inflater for some odd reason.
8080
// - If this ever gets fixed, remove this if block.

0 commit comments

Comments
 (0)