summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/tools/PatternMatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ftbsc/lll/tools/PatternMatcher.java')
-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!");
}