SampleModel.java (getPixel): Set correct array element.

* java/awt/image/SampleModel.java (getPixel): Set correct array
	element.  From Chris Meyer.

From-SVN: r44871
This commit is contained in:
Tom Tromey 2001-08-13 21:38:07 +00:00 committed by Tom Tromey
parent 7ee20eba4a
commit 586b870d4f
2 changed files with 8 additions and 3 deletions

View 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.

View 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;
}