From c6a1bc127a9464bb1831fb04120123a62b100946 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Fri, 30 Dec 2022 09:55:23 +0100 Subject: [PATCH] Fix TABLESWITCH weaver issue with Integer.MAX_VALUE Fixes #190. Signed-off-by: Alexander Kriegisch --- .../java/org/aspectj/apache/bcel/generic/TABLESWITCH.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java index 518530985..ea669f642 100644 --- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java +++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/TABLESWITCH.java @@ -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++) { -- 2.39.5