mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-04 12:05:29 -04:00
TM-80: DecoderStream.skip now correctly skips the bytes it reports as skipped.
This commit is contained in:
parent
36204f378d
commit
91e693724f
@ -156,9 +156,9 @@ public final class DecoderStream extends FilterInputStream {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Skipped can never be more than avail, which is
|
// NOTE: Skipped can never be more than avail, which is an int, so the cast is safe
|
||||||
// an int, so the cast is safe
|
|
||||||
int skipped = (int) Math.min(pLength - total, buffer.remaining());
|
int skipped = (int) Math.min(pLength - total, buffer.remaining());
|
||||||
|
buffer.position(buffer.position() + skipped);
|
||||||
total += skipped;
|
total += skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user