]> source.dussan.org Git - aspectj.git/commitdiff
Fix TABLESWITCH weaver issue with Integer.MAX_VALUE
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 30 Dec 2022 08:55:23 +0000 (09:55 +0100)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Fri, 30 Dec 2022 09:14:42 +0000 (16:14 +0700)
Fixes #190.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java

index 518530985033ee8dd0be73d9ca420077ee27b029..ea669f642e4be8f40a8f3f8c820ea3d36c9296ef 100644 (file)
@@ -124,8 +124,8 @@ public class TABLESWITCH extends InstructionSelect {
                indices = new int[matchLength];
                targets = new InstructionHandle[matchLength];
 
-               for (int i = low; i <= high; i++) {
-                       match[i - low] = i;
+               for (int i = 0; i < matchLength; i++) {
+                       match[i] = low + i;
                }
 
                for (int i = 0; i < matchLength; i++) {