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:
committed by
Michael Koch
parent
a2e0c2a390
commit
005a9448fc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user