We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 171e3fb commit ee47441Copy full SHA for ee47441
io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java
@@ -157,14 +157,13 @@ public void seek(long position) throws IOException
157
{
158
// search forward/backwards if the new position is after/before the current position
159
int increment = position < currentPosition ? -1 : 1;
160
- for (int i = currentIndex; i < numberOfReader && i >= 0;)
+ for (int i = currentIndex; i < numberOfReader && i >= 0; i += increment)
161
162
if (position >= startPositions[i] && position <= endPositions[i])
163
164
currentIndex = i;
165
break;
166
}
167
- i += increment;
168
169
currentPosition = position;
170
0 commit comments