2005-04-19 Guilhem Lavaux <guilhem@kaffe.org>

* java/awt/image/IndexColorModel.java
	(getRGB): Check if pixel is negative.

From-SVN: r98369
This commit is contained in:
Guilhem Lavaux 2005-04-19 04:36:54 +00:00 committed by Michael Koch
parent a2e0c2a390
commit 005a9448fc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-04-19 Guilhem Lavaux <guilhem@kaffe.org>
* java/awt/image/IndexColorModel.java
(getRGB): Check if pixel is negative.
2005-04-19 Michael Koch <konqueror@gmx.de>
* java/awt/image/RasterOp.java:

View File

@ -432,7 +432,7 @@ public class IndexColorModel extends ColorModel
*/
public final int getRGB (int pixel)
{
if (pixel < map_size)
if (pixel >= 0 && pixel < map_size)
return rgb[pixel];
return 0;