Merge pull request #431 from seafraf/master

Added an extra mark to match the reset call in the finally block
This commit is contained in:
Harald Kuhr 2018-08-08 09:41:09 +02:00 committed by GitHub
commit 520c6bd81c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,12 @@ public final class PICTImageReaderSpi extends ImageReaderSpiBase {
else { else {
// Skip header 512 bytes for file-based streams // Skip header 512 bytes for file-based streams
stream.reset(); stream.reset();
// If we don't mark again here, the reset call in the finally block will:
// A) do nothing
// B) eat marks created in the stream previously
stream.mark();
skipNullHeader(stream); skipNullHeader(stream);
} }