aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/tools
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-02-07 14:36:26 +0100
committer zaaarf <zaaarf@proton.me>2023-02-07 14:36:26 +0100
commit53c8d23cd28f35e82b44e8da865c83343f5187e2 (patch)
treebce775d0a20bc9ac03f7d0909aea23bbc78c963e /src/main/java/ftbsc/lll/tools
parent764ff58eaa6fbfbf3e3809e67c23fcccacfa68eb (diff)
fix: corrected mistake in implementation of reverse lookup
Diffstat (limited to 'src/main/java/ftbsc/lll/tools')
-rw-r--r--src/main/java/ftbsc/lll/tools/PatternMatcher.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/ftbsc/lll/tools/PatternMatcher.java b/src/main/java/ftbsc/lll/tools/PatternMatcher.java
index 04631fd..4465f1a 100644
--- a/src/main/java/ftbsc/lll/tools/PatternMatcher.java
+++ b/src/main/java/ftbsc/lll/tools/PatternMatcher.java
@@ -94,8 +94,10 @@ public class PatternMatcher {
break;
} else break;
}
- if(first != null && last != null)
- return new InsnSequence(first, last);
+ if(first != null && last != null) {
+ if(reverse) return new InsnSequence(last, first);
+ else return new InsnSequence(first, last);
+ }
}
throw new PatternNotFoundException("Failed to find pattern!");
}