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.
When approved this will be merged into branch master. From there I will cherry-pick this commit into 2.2.X branch in preparation for a bug fix release 2.2.1.
As reported in issue #178:
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.
When approved this will be merged into branch master. From there I will cherry-pick this commit into 2.2.X branch in preparation for a bug fix release 2.2.1.