Added an extra mark to match the reset call in the finally block

This commit is contained in:
Seafra Forder 2018-07-16 14:21:57 +01:00
parent 7cb1c6811a
commit b43faf2fae

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);
} }