diff options
author | Harvey Harrison <[email protected]> | 2012-10-15 20:01:00 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-10-15 20:30:44 -0700 |
commit | 19bee7d8946721b8d094937abf1b33889b7c32e5 (patch) | |
tree | 32a1044d193e24c031e35036dd072d78d15fd12b /src/jogl/classes/com/jogamp/opengl | |
parent | f8fb65c7cd79743a6501fe63ff1e28479ceedb4f (diff) |
jogl: fix bit shift error in LEDataInputStream
The readlong() method is attempting to build a 64bit value from two 32 bit reads.
The problem is that shifting an int only uses the lower 5 bits of the shift value,
so << 32 is the same as << 0. Cast to long and restore the original intention.
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java index 37dbc54df..b7262aa3e 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java @@ -180,7 +180,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput { int i1 = readInt(); int i2 = readInt(); - return ((long)(i1) & 0xFFFFFFFFL) + (i2 << 32); + return ((long)i1 & 0xFFFFFFFFL) + ((long)i2 << 32); } public final float readFloat() throws IOException |