Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ReadBufferDataHandle: fixed calculating local offset
offset should not be cast to int before modulo operation
  • Loading branch information
trnila committed Jan 6, 2020
commit d3d14176cadb06c026d8964cbb034eff4226d78b
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private byte[] readPage(final int pageID, final int slotID) throws IOException {
* Calculates the offset in the current page for the given global offset
*/
private int globalToLocalOffset(final long off) {
return (int) off % pageSize;
return (int) (off % pageSize);
}

@Override
Expand Down