summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/nio/PointerBuffer.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-01 01:15:31 +0200
committerSven Gothel <[email protected]>2010-04-01 01:15:31 +0200
commitf96bcce55789d2101d594c433aea95806d4eb05c (patch)
tree50ef20f645529096c2ddcee93e21e52273e5cfde /src/java/com/jogamp/common/nio/PointerBuffer.java
parentfdb14c0c37a9e434b302b7d7dd3c6dbc52c02bb5 (diff)
Fix 32bit masking / tests
Diffstat (limited to 'src/java/com/jogamp/common/nio/PointerBuffer.java')
-rw-r--r--src/java/com/jogamp/common/nio/PointerBuffer.java3
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);
}