mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 12:05:29 -04:00
Invert EOF check
This commit is contained in:
parent
ba5c667b6c
commit
cd42d81817
@ -174,13 +174,11 @@ final class CCITTFaxDecoderStream extends FilterInputStream {
|
|||||||
for (int i = 12; i < limitBits; i++) {
|
for (int i = 12; i < limitBits; i++) {
|
||||||
if (i % 8 == 0) {
|
if (i % 8 == 0) {
|
||||||
read = in.read();
|
read = in.read();
|
||||||
if (read > -1) {
|
if (read == -1) {
|
||||||
streamByte = (byte) read;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// no EOL before stream end
|
// no EOL before stream end
|
||||||
return TIFFBaseline.COMPRESSION_CCITT_MODIFIED_HUFFMAN_RLE;
|
return TIFFBaseline.COMPRESSION_CCITT_MODIFIED_HUFFMAN_RLE;
|
||||||
}
|
}
|
||||||
|
streamByte = (byte) read;
|
||||||
}
|
}
|
||||||
|
|
||||||
b = (short) ((b << 1) + ((streamByte >> (7 - (i % 8))) & 0x01));
|
b = (short) ((b << 1) + ((streamByte >> (7 - (i % 8))) & 0x01));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user