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:
parent
a2e0c2a390
commit
005a9448fc
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue