OSDN Git Service

2005-04-19 Guilhem Lavaux <guilhem@kaffe.org>
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2005 04:36:54 +0000 (04:36 +0000)
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Apr 2005 04:36:54 +0000 (04:36 +0000)
* java/awt/image/IndexColorModel.java
(getRGB): Check if pixel is negative.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98369 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/awt/image/IndexColorModel.java

index 78f6bff..39bc9b3 100644 (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:
 2005-04-19  Michael Koch  <konqueror@gmx.de>
 
        * java/awt/image/RasterOp.java:
index e4ccc54..2a8a788 100644 (file)
@@ -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 0;
            return rgb[pixel];
     
     return 0;