aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/java.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/java.ts')
-rw-r--r--lib/compilers/java.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compilers/java.ts b/lib/compilers/java.ts
index a2e027751..8fea06be2 100644
--- a/lib/compilers/java.ts
+++ b/lib/compilers/java.ts
@@ -304,8 +304,11 @@ export class JavaCompiler extends BaseCompiler implements SimpleOutputFilenameCo
for (const codeLineCandidate of utils.splitLines(codeAndLineNumberTable)) {
// Match
// 1: invokespecial #1 // Method java/lang/Object."<init>":()V
- // Or match the "default: <code>" block inside a lookupswitch instruction
- const match = codeLineCandidate.match(/\s+(\d+|default): (.*)/);
+ // Or match lines inside inside a lookupswitch instruction like:
+ // 8: <code>
+ // -1: <code>
+ // default: <code>
+ const match = codeLineCandidate.match(/\s+([-\d]+|default): (.*)/);
if (match) {
const instrOffset = Number.parseInt(match[1]);
method.instructions.push({