From 53c8d23cd28f35e82b44e8da865c83343f5187e2 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Tue, 7 Feb 2023 14:36:26 +0100 Subject: fix: corrected mistake in implementation of reverse lookup --- src/main/java/ftbsc/lll/tools/PatternMatcher.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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!"); } -- cgit v1.2.3-56-ga3b1