aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-21 12:25:36 +0100
committerSven Gothel <[email protected]>2014-02-21 12:25:36 +0100
commit4447232af0d95a4348d09d4ed03fbef48394ca3a (patch)
tree22f385831ee15bb09771ed63421b276e849064f7 /src/java/jogamp/common
parentdac8d11f68ffa3a35fedeab879132c5d9aa4907c (diff)
Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - readUInt32(..) must return long due to EOF
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r--src/java/jogamp/common/os/elf/IOUtils.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/java/jogamp/common/os/elf/IOUtils.java b/src/java/jogamp/common/os/elf/IOUtils.java
index 08bbaa1..57b7a48 100644
--- a/src/java/jogamp/common/os/elf/IOUtils.java
+++ b/src/java/jogamp/common/os/elf/IOUtils.java
@@ -62,7 +62,7 @@ class IOUtils {
}
static int readUInt32(final byte[] in, final int offset) {
- final int v = readInt32(in, offset);
+ final int v = Bitstream.uint32LongToInt(Bitstream.readUInt32(!Platform.isLittleEndian(), in, offset));
if( 0 > v ) {
throw new IllegalArgumentException("Read uint32 value "+toHexString(v)+" > int32-max "+toHexString(MAX_INT_VALUE));
}
@@ -74,10 +74,6 @@ class IOUtils {
return b.asLongBuffer().get(0); */
}
- static int readInt32(final byte[] in, final int offset) {
- return Bitstream.readInt32(!Platform.isLittleEndian(), in, offset);
- }
-
/**
* @param sb byte source buffer to parse
* @param offset offset within byte source buffer to start parsing