Skip to content

Commit 9233908

Browse files
committed
Fix ReadBufferDataHandle.globalToLocalOffset()
Missing parantheses broke it for off > Integer.MAX_VALUE
1 parent dcb568d commit 9233908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main/java/org/scijava/io/handle/ReadBufferDataHandle.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ private byte[] readPage(final int pageID, final int slotID) throws IOException {
182182
* Calculates the offset in the current page for the given global offset
183183
*/
184184
private int globalToLocalOffset(final long off) {
185-
return (int) off % pageSize;
185+
return (int) (off % pageSize);
186186
}
187187

188188
@Override

0 commit comments

Comments
 (0)