jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r897709 - /jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java
Date Sun, 10 Jan 2010 21:27:49 GMT
Author: tcurdt
Date: Sun Jan 10 21:27:48 2010
New Revision: 897709

URL: http://svn.apache.org/viewvc?rev=897709&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=44876 by Timothy Alper

fixed out of bounds exception


Modified:
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java?rev=897709&r1=897708&r2=897709&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/TABLESWITCH.java Sun Jan 10 21:27:48
2010
@@ -80,10 +80,8 @@
         match = new int[match_length];
         indices = new int[match_length];
         targets = new InstructionHandle[match_length];
-        for (int i = low; i <= high; i++) {
-            match[i - low] = i;
-        }
         for (int i = 0; i < match_length; i++) {
+            match[i] = low + i;
             indices[i] = bytes.readInt();
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message