diff options
Diffstat (limited to 'src/java/com/jogamp/common/nio/PointerBuffer.java')
-rw-r--r-- | src/java/com/jogamp/common/nio/PointerBuffer.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/nio/PointerBuffer.java b/src/java/com/jogamp/common/nio/PointerBuffer.java index 26d2e7b..a9b1327 100644 --- a/src/java/com/jogamp/common/nio/PointerBuffer.java +++ b/src/java/com/jogamp/common/nio/PointerBuffer.java @@ -117,7 +117,8 @@ public abstract class PointerBuffer extends AbstractLongBuffer { if(!bb.isDirect()) { throw new RuntimeException("Buffer is not direct"); } - long bbAddr = getDirectBufferAddressImpl(bb); + long mask = Platform.is32Bit() ? 0x00000000FFFFFFFFL : 0xFFFFFFFFFFFFFFFFL ; + long bbAddr = getDirectBufferAddressImpl(bb) & mask; if(0==bbAddr) { throw new RuntimeException("Couldn't determine native address of given Buffer: "+bb); } |