SampleModel.java (getPixel): Set correct array element.
authorTom Tromey <tromey@redhat.com>
Mon, 13 Aug 2001 21:38:07 +0000 (21:38 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Mon, 13 Aug 2001 21:38:07 +0000 (21:38 +0000)
* java/awt/image/SampleModel.java (getPixel): Set correct array
element.  From Chris Meyer.

From-SVN: r44871

libjava/ChangeLog
libjava/java/awt/image/SampleModel.java

index 1421e4c910db20d70f8e0898890062c1b258a33b..c9e66060d13ef666248e7bcf7dfe49d463d49c7a 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-09  Tom Tromey  <tromey@redhat.com>
+
+       * java/awt/image/SampleModel.java (getPixel): Set correct array
+       element.  From Chris Meyer.
+
 2001-08-10  Loren J. Rittle  <ljrittle@acm.org>
 
        * java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
index 5840f78d262956e6056ae4a9e3fb95150b4b25a9..9ce1ae63d3121439c7ca42ee4a0593f5cbfd82e1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000  Free Software Foundation
+/* Copyright (C) 2000, 2001  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -179,7 +179,7 @@ public abstract class SampleModel
     
     for (int b=0; b<numBands; b++)
       {
-        fArray[0] = getSampleFloat(x, y, b, data);
+        fArray[b] = getSampleFloat(x, y, b, data);
       }
     return fArray;
   }
@@ -188,7 +188,7 @@ public abstract class SampleModel
     if (dArray == null) dArray = new double[numBands];
     for (int b=0; b<numBands; b++)
       {
-       dArray[0] = getSampleDouble(x, y, b, data);
+       dArray[b] = getSampleDouble(x, y, b, data);
       }
     return dArray;
   }