From 19bee7d8946721b8d094937abf1b33889b7c32e5 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 15 Oct 2012 20:01:00 -0700 Subject: 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 --- .../classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jogl/classes/com') 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 -- cgit v1.2.3