Commit 005a9448 by Guilhem Lavaux Committed by Michael Koch

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

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

From-SVN: r98369
parent a2e0c2a3
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> 2005-04-19 Michael Koch <konqueror@gmx.de>
* java/awt/image/RasterOp.java: * java/awt/image/RasterOp.java:
......
...@@ -432,7 +432,7 @@ public class IndexColorModel extends ColorModel ...@@ -432,7 +432,7 @@ public class IndexColorModel extends ColorModel
*/ */
public final int getRGB (int pixel) public final int getRGB (int pixel)
{ {
if (pixel < map_size) if (pixel >= 0 && pixel < map_size)
return rgb[pixel]; return rgb[pixel];
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment