summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-04-23 02:45:48 +0200
committerSven Gothel <[email protected]>2014-04-23 02:45:48 +0200
commit52817180ff53304fd586fcae3741b4993b6abf36 (patch)
tree5c4afe24a6397d583a5919c662effdc292d6e887 /src/jogl/classes
parentb222d19e5f45fc3683b58dd788262597a1e14635 (diff)
parent81aa171cd79c10fde9ebd02af516eabbd7283e48 (diff)
Merge remote-tracking branch 'hharrison2/master'
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java1
-rw-r--r--src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
index 8c2922565..240c905a2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
@@ -63,6 +63,7 @@ public class Patchlist {
for (Quilt q = quilts; q != null; q = q.next)
patch = new Patch(q, pta, ptb, patch);
+ pspec = new Pspec[2];
pspec[0] = new Pspec();
pspec[0].range[0] = pta[0];
pspec[0].range[1] = ptb[0];
diff --git a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
index 45087ea2c..078965301 100644
--- a/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
+++ b/src/jogl/classes/jogamp/opengl/util/jpeg/JPEGDecoder.java
@@ -117,8 +117,8 @@ public class JPEGDecoder {
private JFIF(final byte data[]) {
version = new VersionNumber(data[5], data[6], 0);
densityUnits = data[7];
- xDensity = (data[8] << 8) | data[9];
- yDensity = (data[10] << 8) | data[11];
+ xDensity = ((data[ 8] << 8) & 0xff00) | (data[ 9] & 0xff);
+ yDensity = ((data[10] << 8) & 0xff00) | (data[11] & 0xff);
thumbWidth = data[12];
thumbHeight = data[13];
if( 0 < thumbWidth && 0 < thumbHeight ) {
@@ -155,8 +155,8 @@ public class JPEGDecoder {
private Adobe(final byte[] data) {
version = data[6];
- flags0 = (short) ( (data[7] << 8) | data[8] ) ;
- flags1 = (short) ( (data[9] << 8) | data[10] ) ;
+ flags0 = (short)(((data[7] << 8) & 0xff00) | (data[ 8] & 0xff));
+ flags1 = (short)(((data[9] << 8) & 0xff00) | (data[10] & 0xff));
colorCode = data[11];
switch( colorCode ) {
case 2: colorSpace = ColorSpace.YCCK; break;