diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/ftbsc/lll/tools/PatternMatcher.java | 6 |
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!"); } |