Skip to content

Conversation

@leerho
Copy link
Member

@leerho leerho commented May 8, 2024

static Memory wrap(byte[] array, int offsetBytes, int lengthBytes, ByteOrder byteOrder) ...
...
return BaseWritableMemoryImpl.wrapHeapArray(array, 0, lengthBytes, true, ByteOrder.nativeOrder(), null);

The "0" in the return statement should have been "offsetBytes". I checked the similar classes WritableMemory, Buffer and WritableBuffer for a similar error and they were all OK.
This fix includes a test for this bug.

This will be merged into branch 2.2.X in preparation for a bug fix release 2.2.1.

static Memory wrap(byte[] array, int offsetBytes, int lengthBytes,
ByteOrder byteOrder) ...
...
return BaseWritableMemoryImpl.wrapHeapArray(array, 0, lengthBytes, true,
ByteOrder.nativeOrder(), null);

The "0" in the return statement should have been "offsetBytes".
I checked the similar classes WritableMemory, Buffer and WritableBuffer
for a similar error and they were all OK.
This fix includes a test for this bug.

This will be merged into branch 2.2.X in preparation for a bug fix
release 2.2.1.
@leerho leerho merged commit 2fc93f5 into 2.2.X May 8, 2024
@leerho leerho deleted the Fix_issue_178_for_2.2.X branch May 27, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant